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

  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 but no luck Please suggest
asked 7 months ago185 views
1 Answer

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?

answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions