Last active
February 24, 2022 22:04
-
-
Save aldy120/1104b3c1d735432352bffed9c49c08d3 to your computer and use it in GitHub Desktop.
assume role
This file contains hidden or 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
| aws sts assume-role --role-arn arn:aws:iam::32522793xxxx:role/admin-32522793xxxx --role-session-name xxx | |
| { | |
| "Credentials": { | |
| "AccessKeyId": "ASIAUXOIYM7XXDCJxxxx", | |
| "SecretAccessKey": "********", | |
| "SessionToken": ""*******************",", | |
| "Expiration": "2022-02-24T01:16:44+00:00" | |
| }, | |
| "AssumedRoleUser": { | |
| "AssumedRoleId": "AROAUXOIYM7XYUEUW****:asdf", | |
| "Arn": "arn:aws:sts::32522793xxxx:assumed-role/admin-32522793xxxx/asdf" | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There should be enoung
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-role.html#cli-role-prepare
Required permissions for the identity to assume role.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "sts:AssumeRole", "Resource": "arn:aws:iam::123456789012:role/marketingadminrole" } ] }The trust policy of assumed role must have permission for the account.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::123456789012:root" }, "Action": "sts:AssumeRole" } ] }