You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ pip install awscli
...
$ aws configure # and setup the default profile
...
$ head -n4 ~/.aws/credentials
[default]
aws_access_key_id = AKIAX2J7XXXX7TCRYB
aws_secret_access_key = 82B6XXXXF9haINGLbM3XXXNzL
Setup for MFA
$ source /path/to/aws-sts-mfa-session.sh
$ alias aws=aws-sts-mfa-session
$ aws sts get-caller-identity
Enter the MFA token for arn:aws:iam::537540003341:mfa/john.doe: 719274
{
"UserId": "AIDAXXXXXKRBB2",
"Account": "12309834586",
"Arn": "arn:aws:iam::537540003341:user/john.doe"
}
# From here on, you will not be prompted for the MFA token# unless it expires or is invalidated.
$ aws s3 ls
2021-10-28 12:32:42 prod-5y5xxxxyux-eu-west-1
2021-10-28 12:33:16 stage-5y5txxxxux-us-east-1
...
$ terraform plan
...
$ cdk deploy
...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters