1
votes

error : /scripts/execute-deploy.sh Script at specified location: /scripts/execute-deploy.sh failed with error Errno::ENOENT with message No such file or directory - /opt/codedeploy-agent/deployment-root/0e164065-68f3-4cac-b540-6b70eaea7b0d/d-RSJV81S50/deployment-archive/scripts/execute-deploy.sh

Project on Github

I am trying to upload projects to an AWS ec2 instance, build them, and deploy them.

Right now, you can see the structure in the picture below.

enter image description here

I checked that the .zip file is saved without error in s3.

An error like this occurs when its building in codedeploy:

enter image description here

I tried googling. I tried to create a codedeploy application. I tried searching. Nothing has worked so far.

It says it could not locate the file, but there is actually a file in the directory.

enter image description here

This is my appspec.yml:

enter image description here

I really want to find a solution. Any help will be appreciated. I've been trying to solve it by myself for 4 days now.

1
Firstly, can you check to remove the script from the hook and see if deployment succeeds. Also what is in your execute-deploy.sh? Can you check if newline is as Linux uses instead of Windows. - shariqmaws
Do you have any previous successful deployment with your code deploy application. If yes redeploy that using a manual process instead. One more thing you can do is stop and restart your codedeploy agent on EC2 instance. If this don't work too, remove codedeploy agent completely and and /opt/codedeploy-agent. Reinstall codedeploy agent, then create deployment. - matesio

1 Answers

0
votes

Have you tried to manually execute your deployment in CodeDeploy applications via AWS Console ?