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?
DevOps Stack Exchange is a question and answer site for software engineers working on automated testing, continuous delivery, service integration and monitoring, and building SDLC infrastructure. It only takes a minute to sign up.Sign up to join this community
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
docker run -e AWS_ACCESS_KEY_ID=XXXX -e AWS_SECRET_ACCESS_KEY=XXXX myimage
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