AWS CLI v2 on OSX – Upgrade to latest

I was working on a project with a client where I wasn’t able to initialize a terragrunt deployment when using SSO:

> terragrunt init
ERRO[0001] Error finding AWS credentials (did you set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables?): SSOProviderInvalidToken: the SSO session has expired or is invalid
caused by: expected RFC3339 timestamp: parsing time "2021-03-26T03:45:21UTC" as "2006-01-02T15:04:05Z07:00": cannot parse "UTC" as "Z07:00"
ERRO[0001] Unable to determine underlying exit code, so Terragrunt will exit with error code 1

The version of the AWS CLI that I was using was 2.0.56. Upgrading to the latest version solved the issue (2.1.32). Be sure to login again after upgrading.

curl "" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /

Verify by running the following command:

aws --version
aws-cli/2.1.32 Python/3.8.8 Darwin/20.3.0 exe/x86_64 prompt/off






Leave a Reply

Your email address will not be published. Required fields are marked *