Skip to content

DynamoDB SSO connect fails with modern sso-session profiles #1333

Closed

Description

@gustaferiksson

What happened?

Trying to connect to DynamoDB using SSO + a profile that uses an sso-session block in ~/.aws/config. Right after running aws sso login --profile my-profile successfully, TablePro errors with:

Authentication failed: SSO cache file not found for profile 'my-profile' at /Users/<me>/.aws/cli/cache/<sha1>.json. Run 'aws sso login --profile my-profile' first.

But I just did. Turns out aws sso login only writes the OIDC token to ~/.aws/sso/cache/. The ~/.aws/cli/cache/ file the plugin is looking for only gets created lazily once some AWS CLI/SDK command actually does the GetRoleCredentials exchange. So directly after aws sso login that directory doesn't even exist yet.

If I then run aws sts get-caller-identity --profile my-profile, the cache file does show up, with exactly the sha1 filename the plugin computes, so that part is right. But now I get a different error:

Authentication failed: SSO cache file for profile 'my-profile' is missing credential fields. Run 'aws sso login --profile my-profile' first.

The file is there and looks fine. Contents:

{
  "ProviderType": "sso",
  "Credentials": {
    "AccessKeyId": "...",
    "SecretAccessKey": "...",
    "SessionToken": "...",
    "Expiration": "...",
    "AccountId": "..."
  }
}

In resolveSsoCredentials() (in Plugins/DynamoDBDriverPlugin/DynamoDBConnection.swift) the parse reads json["AccessKeyId"], json["SecretAccessKey"], json["SessionToken"] at the top level, but they live under Credentials. So the parse can never succeed against a real AWS CLI cache file.

Steps to reproduce

  1. ~/.aws/config with a modern sso-session profile:
    [sso-session my-sso]
    sso_start_url = https://<org>.awsapps.com/start#/
    sso_region = eu-west-1
    sso_registration_scopes = sso:account:access
    
    [profile my-profile]
    sso_session = my-sso
    sso_account_id = 111111111111
    sso_role_name = AWSAdministratorAccess
    region = eu-west-1
  2. rm -rf ~/.aws/cli/cache && aws sso login --profile my-profile
  3. Connect in TablePro → "SSO cache file not found".
  4. aws sts get-caller-identity --profile my-profile to force the cache to be populated.
  5. Reconnect → "SSO cache file ... is missing credential fields".

Expected behavior

aws sso login --profile <p> should be enough to connect

Database type

N/A

TablePro version

0.43.0

macOS version & chip

macOS 26.3.1 / Apple Silicon

Screenshots / Logs

No response

Activity

  1. added
    bug
    on May 19, 2026
  2. datlechin commented on May 19, 2026

    @datlechin
    Member

    Hello @gustaferiksson, i've tagged new DynamicDB version, go to Settings -> Plugins and update to latest version. It should working now.

  3. gustaferiksson commented on May 19, 2026

    @gustaferiksson
    Author

    @datlechin wow that was quick, works!

  4. datlechin commented on May 19, 2026

    @datlechin
    Member

    Glad to hear it works 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions