How do I allow EC2 Agent to retrieve Secrets from Secret Manager when using CodeDeploy?

0

We have an EC2 instance that is running a CodeDeploy agent on Windows Server. I have a powershell script that runs as part of the CodeDeploy deployment in an "after-install" script. This script uses aws CLI to retrieve secrets and then updates a file in our app. When it tries to run during a deployment, it fails - the script execution times out. If I run the same script from a powershell window on the EC2 server, it works fine and only takes a few seconds. How to configure CodeDeploy agent on EC2 to have permissions to secret manager?

1개 답변
1

There is a blog that shows how this can be accomplished using the Parameter Store - https://aws.amazon.com/blogs/mt/use-parameter-store-to-securely-access-secrets-and-config-data-in-aws-codedeploy/

profile pictureAWS
전문가
답변함 2년 전

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

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

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

관련 콘텐츠