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年前718ビュー
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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ