By using AWS re:Post, you agree to the Terms of Use

AWS Secrets Manager Integration


I'd like to integrate AWS Secrets Manager within my application. How do I read the password using VPC EP? I was not able to query the Secrets Manager in the CLI without setting the proxy. I also don't want to mention the VPC EP in the commands. Any pointers would be greatly appreciated. I'd like to run this command without setting proxy and the VPC EP.

aws secretsmanager get-secret-value --secret-id MySecret

2 Answers

Hi - you can do this by enabling Private DNS for the Secrets Manager VPC Endpoint, when you created it, did you enable the Private DNS option? More on enabling Private DNS when creating an Endpoint under point 5 here: You can modify an existing endpoint to enable Private DNS also, more here:

answered 6 months ago

Because you're using a private endpoint you need to tell the CLI (and any other tools) to use that endpoint. You can find the DNS name for the endpoint in the console.

aws secretsmanager get-secret-value --secret-id MySecret --endpoint <endpoint address>

profile picture
answered 6 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