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
demandé il y a 3 mois123 vues
1 réponse
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
EXPERT
répondu il y a 3 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions