Skip to content

fix(plugin-dynamodb): connect with SSO sso_session profiles after aws sso login#1334

Merged
datlechin merged 2 commits into
mainfrom
fix/dynamodb-sso-modern-session
May 19, 2026
Merged

fix(plugin-dynamodb): connect with SSO sso_session profiles after aws sso login#1334
datlechin merged 2 commits into
mainfrom
fix/dynamodb-sso-modern-session

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • Drop dependency on ~/.aws/cli/cache (side-effect cache that only AWS CLI/SDK populates after a GetRoleCredentials exchange).
  • Read OIDC access token from ~/.aws/sso/cache/<sha1>.json (what aws sso login actually writes) and call the SSO portal GetRoleCredentials endpoint directly, matching how AWS SDKs resolve SSO credentials.
  • Support both modern sso_session and legacy SSO profiles. For modern profiles, resolve sso_start_url and sso_region from the referenced [sso-session ...] block.

Fixes #1333

Test plan

  • Connect DynamoDB with an sso_session profile immediately after aws sso login --profile <p> (no other AWS CLI commands needed first)
  • Connect with a legacy SSO profile (no sso_session, sso_start_url + sso_region directly on the profile)
  • Missing or expired token shows "Run 'aws sso login --profile <p>'" message
  • 401 from portal surfaces as session-expired error; 403 surfaces as role-not-accessible

@datlechin datlechin merged commit b095c32 into main May 19, 2026
2 checks passed
@datlechin datlechin deleted the fix/dynamodb-sso-modern-session branch May 19, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DynamoDB SSO connect fails with modern sso-session profiles

1 participant