0

I'm attempting to troubleshoot my failed deployments and cannot locate any logs for CodeDeploy.

I have a CentOS 7 server with a website running on Apache at /var/www/html/. reset.sh is suppose to reset file/folder permissions after a deployment.

My appspec.yml looks like this:

version: 0.0
os: linux
files:
  - source: /*
    destination: /var/www/html/
hooks:
  AfterInstall:
    - location: reset.sh
      timeout: 3000
      runas: centos 
tylersDisplayName
  • 1,603
  • 4
  • 24
  • 42
  • Your appspec file looks fine to me. What kind of errors were you seeing for your failed deployment? The log dir is at /var/log/aws/codedeploy-agent. –  May 16 '16 at 15:49

1 Answers1

1

There were two main configuration issues that prevented this from working -

  1. I needed an IAM Instance Profile (not to be confused with the IAM Role created for CodeDeploy).

    http://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-create-iam-instance-profile.html

  2. Secondly, after I launched my target instance with this profile attached, I had to install the CodeDeploy agent on my server.

Once this was in place I started to see event errors which let me know that my source needed to be / rather than /*.

tylersDisplayName
  • 1,603
  • 4
  • 24
  • 42