I'm looking to set up a local Docker instance of AWS Secrets Manager.
I've been scouring the web for an image or anything of the sort that I can use. I can only find documentation for AWS ECS secrets management.
Does anyone have any experience with setting up AWS Secrets Manager for local testing through Docker? Thanks!
AWS Secrets Manager is supported at http://localhost:4584 by default.
AWS Secrets Manager now enables you to replicate secrets across multiple AWS Regions. You can now give your multi-Region applications access to replicated secrets in the corresponding Regions and rely on AWS Secrets Manager to keep the replicas in sync with the primary secret.
Good question!
You could run localstack [1] inside a docker container. It mocks some of the AWS services for testing purposes. AWS Secrets Manager is supported at http://localhost:4584 by default.
There are some useful blog posts covering localstack. [2][3]
However, I could not find any blog post covering AWS Secrets Manager on localstack. I guess you have to try it out yourself.
[1] https://github.com/localstack/localstack
[2] https://medium.com/@andyalky/developing-aws-apps-locally-with-localstack-7f3d64663ce4
[3] https://medium.com/pareture/localstack-for-local-aws-dev-22775e483e3d
You can setup local AWS SecretManager inside LocalStack using the following command:
aws --endpoint-url=http://localhost:4566 secretsmanager create-secret --name my_secret --secret-string [{"my_uname":"username","my_pwd":"password"}]
Output:
{
"ARN": "arn:aws:secretsmanager:us-east-1:000000000000:secret:my_secret-denusf",
"Name": "my_secret",
"VersionId": "e168cdf1-5c94-493d-bafd-791779a7515d"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With