Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ aws sts assume-role --role-arn arn:aws:iam::012345678901:role/accountb-role --role-session-name test
- $ aws ec2 describe-instances --profile AccountB
- 'aws_access_key_id'
- [default]
- region = us-east-1
- [profile AccountB]
- role_arn = arn:aws:iam::012345678901:role/accountb-role
- {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Principal": {
- "Service": "lambda.amazonaws.com"
- },
- "Action": "sts:AssumeRole"
- },
- {
- "Effect": "Allow",
- "Principal": {
- "AWS": "arn:aws:iam::012345678900:role/accounta-role"
- },
- "Action": "sts:AssumeRole"
- }
- ]
- }
- {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Sid": "Stmt1490625590000",
- "Effect": "Allow",
- "Action": [
- "sts:AssumeRole"
- ],
- "Resource": [
- "arn:aws:iam::012345678901:role/accountb-role"
- ]
- }
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement