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 年前檢視次數 719 次
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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南