Bug: SSO Authentication stopped working
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 1.2k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 52
Description
### Description:
Since installing `sam` 1.60.0, we notice that the Session is expired even though the Credentials are not.
### Steps to reproduce:
* Login into SSO `aws configure sso --profile default`
* Add SSO Credentials to `$HOME/.aws/config`
### Observed result:
```
sam package --output-template-file packaged.yaml --s3-bucket
Error: Unable to upload artifact referenced by Location parameter of resource.
Unable to upload artifact referenced by CodeUri parameter of resource.
The SSO session associated with this profile has expired or is otherwise invalid. To refresh this SSO session run aws sso login with the corresponding profile.
make: *** [package] Error 1
```
`~/.aws/sso/cache/.json` contents:
```
{
"startUrl": "",
"region": "eu-west-1",
"accessToken": ",
"expiresAt": "2022-10-14T17:12:19Z",
"clientId": "",
"clientSecret": "",
"registrationExpiresAt": "2023-01-12T09:12:11Z"
}
```
By performing a simple command, like `aws s3 ls` everything is shown correctly.
This happens around 20/30 minutes after SSO CLI Login
### Expected result:
`sam package` to work
### Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
1. OS: Mac OSX
2. `sam --version`: 1.60.0
3. AWS region: eu-west-1
Contributor guide
Assessment
This issue has not been assessed yet.