Alberto Carmona
Alberto Carmona

Reputation: 477

AWS Code Deploy Error Deployment Failed

I am trying to setup CodeDeploy for my application and I keep getting the following error during the BeforeInstall part of the deployment.

Error Code UnknownError
Script Name
MessageNo such file or directory - /opt/codedeploy-agent/deployment-
root/a5ee4c0b-a87a-4865-84a3-52bed8458234/d-L8EAGZTJN/deployment-
archive/appspec.yml
Log Tail

I have the IAM policies and roles correct and I have CodeDeploy setup and running on my instance I am trying to deploy to.

Could be my code the problem or it is sure it is something related to Amazon config?

Many thanks

Upvotes: 0

Views: 1315

Answers (1)

mssnrg
mssnrg

Reputation: 96

When you are deploying through code-deploy, you need to place appspec.yml file in the root folder. This file should contain the steps to stop the previous application, install dependencies and start the application.

If you are deploying the linux server, appspec.yml should call the bash files to stop previous instance, install dependencies and start the application.

Check the below link for sample applications

https://github.com/awslabs/aws-codedeploy-samples/tree/master/applications

Upvotes: 1

Related Questions