Created
February 28, 2019 18:47
-
-
Save shmick/cd513570cde9029394c3488519479593 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using the saml2aws utility, you can get a set of temporary AWS credentials that you can export to your docker container. | |
Use this command to put those credentials into a local environment file for docker: | |
$ saml2aws exec env | egrep 'AWS_(ACC|SECR|SES)' > env.file | |
Running command as: arn:aws:sts::123456789012:assumed-role/AWS-MyRole/[email protected] | |
You should now see AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN inside of env.file | |
Now start your container with the --env-file option, using the env.file you just created. | |
$ docker run --env-file env.file -p .... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment