Aws-cli: Environment variables for assume role

Created on 9 May 2017  路  4Comments  路  Source: aws/aws-cli

Hey,

Currently, I have this in my ~/.aws/credentials file.

[account_B]
role_arn = arn:aws:iam::<account_ID>:role/<IAM_ROLE>
source_profile = <some_profile>

And I am using below CLI commands to assume role

aws --profile account_B <other arguments>

Is there a way to use role_arn and source_profile as environment variables? I am looking out a way to not have these saved in ~/.aws/credentials file and use environment variables.

Cheers.

credential-provider feature-request

Most helpful comment

@mmeany that is exactly my use case

All 4 comments

We don't currently have a way to use assume role via environment variables. Marking as a feature request.

Thanks @JordonPhillips 馃憤

Would be useful where Docker containers are being used as part of a build pipeline that is configured with environment variables.

@mmeany that is exactly my use case

Was this page helpful?
0 / 5 - 0 ratings