All the tutorials I've seen for AWS Secrets Manager have secrets being retrieved by the CLI. How is this done in production?

Can I mount a set of secrets to a docker container as a file?

1 Answer 1


Access to AWS Secrets Manager requires AWS credentials. Those credentials must have permissions to access the AWS resources that you want to access, such as your Secrets Manager secrets. The following sections provide details on how you can use AWS Identity and Access Management (IAM) policies to help secure access to your secrets and control who can access and administer them.

so you need to provide the aws credentials to docker which has access to the manger

you can follow on of these methods:

providing the credentials with run command:


or providing the file ~/.aws/credentials and then create your container:

docker-machine create --driver amazonec2 --amazonec2-open-port 8000 --amazonec2-region us-west-1 aws-sandbox

see this

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.