Issue with AWS CodeDeploy Across Multiple Regions - Unable to Connect EC2 in Stockholm Region

0

Hello AWS Community,

I've been encountering a persistent issue while attempting to deploy applications using AWS CodeDeploy across several regions, including London, Frankfurt, and Stockholm. The problem persists across all these regions, but it's particularly acute in the Stockholm region, where I am unable to even establish a connection to an EC2 instance.

The recurring error message I encounter is: "CodeDeploy agent was not able to receive the lifecycle event. Check the CodeDeploy agent logs on your host and ensure the agent is running and can connect to the CodeDeploy server."

Here are the troubleshooting steps I've taken so far:

Verified that the CodeDeploy agent is installed and running on the hosts. Reviewed the CodeDeploy agent logs for errors, but found no clear indications that could resolve the issue. Confirmed that network firewalls are not blocking communication. Checked that necessary ports (443 for HTTPS) are open. Ensured that EC2 instances have the correct IAM role and policy for AWS CodeDeploy. Restarted the CodeDeploy agent. Checked that the server's time is synchronized with an NTP server. Reviewed the CodeDeploy agent's configuration file for any discrepancies. Despite these actions, the issue persists. I would greatly appreciate any guidance or suggestions to resolve this issue, especially in the Stockholm region where I can't even connect to EC2.

Thank you in advance for your help!

Mariem
질문됨 3달 전123회 조회
1개 답변
0

Hello.

but it's particularly acute in the Stockholm region, where I am unable to even establish a connection to an EC2 instance.

If you can't connect to EC2, does that mean you can't connect with SSH or something?
In that case, please check if there is a route to the Internet gateway in the route table of the subnet where EC2 is running.
Also make sure that SSH is allowed in the EC2 security group.
If you are connecting using Systems Manager's session manager, please also check whether the "AmazonSSMManagedInstanceCore" policy is set in the EC2 IAM role.

Is your EC2 running in a private subnet?
In that case, you will need to configure a NAT Gateway or VPC endpoint to communicate with CodeDeploy.
https://docs.aws.amazon.com/codedeploy/latest/userguide/vpc-endpoints.html#create-vpc-endpoint-for-codedeploy

profile picture
전문가
답변함 3달 전

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

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

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

관련 콘텐츠