so I have been trying to setup code deploy for my application, but it keeps on failing. Initially, I didn’t have an appspec.yml file in repository, so I got the error message that the appspec.yml file doesn’t exist.
I have now included an appspec.yml file, but it still doesn’t work and it doesn’t give any error message. There are no events mentioned, like it used to before adding the appspec file.
I have less than a beginner’s knowledge when it comes to creating a appspec.yml file, but I took hint from a youtube tutorial, and here is the file.
- source: /
If it helps, the ec2 instance is running an ubuntu server, /var/www/cms is that directory out of which the nginx is supposed to serve files.
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:
- Confirm that you installed the CodeDeploy agent
- Confirm that you’ve created the IAM service role
- Confirm that you have the IAM Instance Profile and that it’s associated with the instance
- Check that you can reach the CodeDeploy commands endpoint in your region from the box. i.e.
ping codedeploy.us-east-1.amazonaws.comOtherwise, your networking setup might be too restrictive.
- Look at the logs on the host to see what’s going on