Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default to AWS_DEFAULT_PROFILE for IAM assume-role #380

Merged
merged 1 commit into from
Feb 23, 2019

Conversation

joshmyers
Copy link
Contributor

what

Default to AWS_DEFAULT_PROFILE for IAM assume-role

why

If AWS_IAM_ROLE_INTERACTIVE is not set, we default to previous behaviour
of using AWS_DEFAULT_PROFILE and not prompting via selector. Rather
than removing our (CloudPosse) use of AWS_DEFAULT_PROFILE from the stage
Dockerfiles, check for the presence of AWS_IAM_ROLE_INTERACTIVE var. AWS_DEFAULT_PROFILE is used in other places, so we don’t want to remove it.

assume-role therefore has the following precedence:

assume-role $role - assumes $role
assume-role - with AWS_IAM_ROLE_INTERACTIVE set will prompt with a role selector
assume-role - assumes $AWS_DEFAULT_PROFILE

If AWS_IAM_ROLE_INTERACTIVE is not set, we default to previous behaviour
of using AWS_DEFAULT_PROFILE and not prompting via selector. Rather
than removing our (CloudPosse) use of AWS_DEFAULT_PROFILE from the stage
Dockerfiles, check for the presence of AWS_IAM_ROLE_INTERACTIVE var. AWS_DEFAULT_PROFILE is used in other places, so we don’t want to remove
it. `assume-role` therefore has the following precedence:

`assume-role $role` - assumes $role
`assume-role`       - with AWS_IAM_ROLE_INTERACTIVE set will prompt with a  role selector
`assume-role`       - assumes AWS_DEFAULT_PROFILE
@osterman osterman merged commit cc78862 into master Feb 23, 2019
@osterman
Copy link
Member

Thanks @joshmyers !!

@Nuru Nuru deleted the default_aws_profile branch April 8, 2019 01:22
leb4r pushed a commit that referenced this pull request Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants