0

I have created a new instance and attached instance role for it and installed code-deploy agent in it as per the documentaion. Then I have created a application and trying to deploy sample revision ie SampleApp_Linux which is provided in aws doc.While creating application I am using AWS codedeply service role which is correct role. I have uploaded my application in s3 bucket. Now the issue is when I try to deploy code from s3 bucket it gets fail in third step ie before install. As per logs Error CodeUnknownError Script Name MessageNo such file or directory - /opt/codedeploy-agent/deployment-root/57ef2ee1-cbd1-4188-ac4c-44d9419a9cb2/d-YCH2YWYOI/deployment-archive/appspec.yml

Same thing I can observe in /var/log/aws/codedeploy agent

extra info: Please tell me am i missing some thing?Its actutally a httpd server.In that application simple html file is there.And aspec.yml file and scripts folder. Please help me with this.

chandra
  • 123
  • 1
  • 1
  • 10

2 Answers2

0

The appspec.yml file should be at the root of the archive you upload to S3 or the GitHub repo you are deploying with. It seems CodeDeploy cannot find the appspec.yml file and hence failing the deployment. Please make sure the appspec.yml file is at the root of the archive, i.e., when unzip the bundle, all the files are extracted to the current directory not a new folder

0

Please check the path to beforeinstall scrip. Let's say you have a script in scripts folder in root directory. the path specification in app spec should be scripts/yourscriptname.sh

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 07 '22 at 05:44