AWS Issues and Potential Solutions

CODEDEPLOY

Issue:

‘The deployment failed because a specified file already exists at this location’

Solution:

See this for an explanation of why this error appears

Fix for me was to add the following to my appspec.yml

rm -rf /home/ec2-user/node

The /home/ec2-user/node should be replaced with the directory in which you need to clear the contents


Issue:

‘$’\r’: command not found’

Solution:

Line-end in Linux is ‘\n’ while in Windows it is ‘\r\n’.

In our case, the scripts to run during a Codedeploy had come into contact with an editor on a Windows machine. This through the editing of the file out and extra formatting introduced.

When the script was run, the linux machine had trouble with the \r character

Advertisements