Skip to content

Instantly share code, notes, and snippets.

@churnd
Created February 9, 2022 16:17
Show Gist options
  • Save churnd/c9f15c5d222bbef5df4523611b7ea8d4 to your computer and use it in GitHub Desktop.
Save churnd/c9f15c5d222bbef5df4523611b7ea8d4 to your computer and use it in GitHub Desktop.
aws cli assume role
~/.aws/config:
[profile account1]
region = us-east-1
output = json
[profile account2]
region = us-east-1
output = json
role_arn = arn:aws:iam::<account1_number>:role/<role_name>
source_profile = account1
~/.aws/credentials:
[account1]
aws_secret_access_key = <account1_iam_access_key>
[account2]
role_arn = arn:aws:iam::<account1_number>:role/<role_name>
source_profile = account1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment