Skip to content

Unable to use s5cmd when using aws sso #726

@agrawalsourav98

Description

@agrawalsourav98

I am using sso for authentication in aws cli and s5cmd throws error when trying to use it with sso. I don't have any other profile configured.

When running, s5cmd ls,
I get,
ERROR "ls": profile "sso" is configured to use SSO but is missing required configuration: sso_region, sso_start_url
and my config is of format,

[profile sso]
sso_session = xxx
sso_account_id = xxx
sso_role_name = xxx
region = us-east-1
output = table
[sso-session xxx]
sso_start_url = xxx
sso_region = us-east-1
sso_registration_scopes = sso:account:access

Even when I update my config to have the information requested in the error, and my updated config looks like this,

[profile sso]
sso_session = xxx
sso_account_id = xxx
sso_role_name = xxx
region = us-east-1
output = table
sso_start_url = xxx
sso_region = us-east-1
sso_registration_scopes = sso:account:access
[sso-session xxx]
sso_start_url = xxx
sso_region = us-east-1
sso_registration_scopes = sso:account:access

I get this error,
ERROR "ls": SSOProviderInvalidToken: the SSO session has expired or is invalid caused by: open /home/xxx/.aws/sso/cache/xxx.json: no such file or directory but aws s3 ls works fine.

Is there any additional config to make s3cmd work with sso? And I believe the error in the first error can be mitigated if we reference the sso_session in the profile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions