Access secrets from secrets manager into the code the running EC2 docker

0
  1. I am running a Golang code running in the docker container [VPC[EC2VM[docker[go code]]]
  2. Secrets stored in AWS secrets manager.
  3. The VM is running with the proper role and permission to access the SecretsManagerReadWrite
  4. The Golang code is the same as provided while creating secrets in AWS SM My code is not getting the secrets. but getting the below error NoCredentialProviders: no valid providers in chain. Deprecated.\n\tFor verbose messaging see aws.Config.CredentialsChainVerboseErrors" I also tried https://aws.amazon.com/blogs/security/how-to-connect-to-aws-secrets-manager-service-within-a-virtual-private-cloud/. but no luck Please suggest
已提问 2 年前725 查看次数
1 回答
0

That is not the exact use case, I think. In My case, I have a VM running with a custom CentOS AMI, within a VPC and VM is running with the proper role and permission needed to access the secret from the secrets manager. The Golang code is running inside a docker container. I don't want to provide the aws_access_key_id and aws_secret_access_key to the VM as it is running on AWS VPC. My expectation is that the Go program should read the secret to connect to the DB. It did not ever work for me. Any suggestions?

已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则