2
You need to provide aws credentials inside your container. You can mount them dinamically using a volume:
docker run -v $HOME/.aws:/root/.aws --rm -it -p 8080: 80 image_name
Your credentials should be locally in $HOME/.aws
, then they are mounted into the home directory of the user that runs your application (change /root to another dir if the user is other)
0
The AWS region is not configured inside your container, and probably neither are the credentials. Have a look at the documentation or here.
The files generated by the CLI for the profile configured in the previous section look like this:
~/.aws/credentials
[default]
aws_access_key_id=AKIAIOSFODNN7EXAMPLE
aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY~/.aws/config
[default]
region=us-west-2
output=jsonThe following settings are supported.
aws_access_key_id โ AWS access key.
aws_secret_access_key โ AWS secret key.
aws_session_token โ AWS session token. A session token is only required if you are using temporary security credentials.
region โ AWS region.
output โ output format (json, text, or table)