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년 전717회 조회
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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인