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

Add support for AWS_SESSION_TOKEN #13

Open
dmuth opened this issue May 31, 2018 · 2 comments
Open

Add support for AWS_SESSION_TOKEN #13

dmuth opened this issue May 31, 2018 · 2 comments

Comments

@dmuth
Copy link

dmuth commented May 31, 2018

The environment I am currently in uses temporary credentials, which makes use of a third environment variable: AWS_SESSION_TOKEN.

Is there any chance that support for that could be added in? (I would be happy to test :-)

Thanks,

-- Doug

@evu
Copy link

evu commented Jan 10, 2019

Just pass it in to the container with the other variables:

docker run --rm -t $(tty &>/dev/null && echo "-i") -e "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" -e "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" -e "AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN}" -e "AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION}" -v "$(pwd):/project" mesosphere/aws-cli

Full example script is here, if you're trying to run this on an ec2 using the IAM role:

https://gist.github.com/evu/136633f81262bb205d0253fd2c2ff38a

@jess-belliveau
Copy link

Thanks @evu - confirmed this works for me.

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

No branches or pull requests

3 participants