Skip to content

[v2] sync command doesn't fail immediately when SSO token expires #4863

@borrell

Description

@borrell

When executing an S3 sync with an SSO profile, if the SSO token expires during the sync (e.g. expires via timeout), then the sync will continue, trying each file and displaying an error noting that the token has expired.

aws2 sync --profile SSOProfileName docs/ s3://example.bucket/backups

upload: ../docs/file1.txt to s3://example.bucket/backups/file1.txt 
upload failed: ../docs/file2.txt to s3://example.bucket/backups/file2.txt The SSO session associated with this profile has expired or is otherwise invalid. To refresh this SSO session run aws2 sso login with the corresponding profile.
upload failed: ../docs/file3.txt to s3://example.bucket/backups/file3.txt The SSO session associated with this profile has expired or is otherwise invalid. To refresh this SSO session run aws2 sso login with the corresponding profile.
upload failed: ../docs/file4.txt to s3://example.bucket/backups/file4.txt The SSO session associated with this profile has expired or is otherwise invalid. To refresh this SSO session run aws2 sso login with the corresponding profile.
...

I would imagine (without entirely thinking through any possible side-effects) that the desired behaviour would be for the sync to fail immediately, rather than continue retrying.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions