dchoruzy
dchoruzy

Reputation: 349

CodeDeploy events not running

This is how my CodeDeploy status looks like: enter image description here

enter image description here

This is first time I'm trying to set this up. I created EC2 and added following policies to attached IAM role: enter image description here

and edited Trust relationships like this:

enter image description here

also I installed code deploy agent on EC2 instance.

this is my appspec.yml

version: 0.0
os: linux
files:
  - source: .
    destination: /home/ubuntu
hooks:
  ApplicationStop:
    - location: scripts/stop_server.sh
      timeout: 5
      runas: root

stop_server.sh is just an empty file

any ideas?

Upvotes: 0

Views: 1120

Answers (1)

Majid Rehman
Majid Rehman

Reputation: 161

The most likely problem you're facing is that the agent either isn't installed or the instance doesn't have sufficient permissions. When there are no events started on the instance for the deployment, it means that CodeDeploy couldn't talk to the host for some reasons.

Here's the steps I would take:

  1. Confirm that you installed the CodeDeploy agent
  2. Confirm that you've created the IAM service role
  3. Confirm that you have the IAM Instance Profile and that it's associated with the instance
  4. Check that you can reach the CodeDeploy commands endpoint in your region from the box. i.e. ping codedeploy.us-east-1.amazonaws.com Otherwise, your networking setup might be too restrictive.
  5. Look at the logs on the host to see what's going on

Upvotes: 1

Related Questions