Created
October 26, 2020 17:58
-
-
Save mbarneyjr/5da7a1bcc5f2b972769d76ba9c6d7b46 to your computer and use it in GitHub Desktop.
aws sts assume-role one-liner
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
export $(aws sts assume-role --role-arn arn:aws:iam::$TARGET_ACCOUNT_ID:role/ci-access --role-session-name ci --output text --query "[['AWS_ACCESS_KEY_ID',Credentials.AccessKeyId],['AWS_SECRET_ACCESS_KEY',Credentials.SecretAccessKey],['AWS_SESSION_TOKEN',Credentials.SessionToken]][*].join(\`=\`,@)") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment