aws-cli
aws-cli copied to clipboard
Add support for AWS_SESSION_TOKEN
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
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
Thanks @evu - confirmed this works for me.