i am trying to deploy the python application through code-deploy to the ec2 instances but during deployment i am facing this error
The deployment failed because a specified file already exists at this location: /home/ubuntu/yello/manage.py
attaching my appsecfile also tried with overwrite but no luck
version: 0.0
os: linux
files:
- source: /
destination: /home/ubuntu/yello
overwrite: true
hooks:
AfterInstall:
- location: script/services.sh
timeout: 300
runas: ubuntu
can anyone help ?
This is a very common error so AWS public docs has a section for the same.
Basically when creating the deployment, you need to select
Overwrite the contentoption so the deployment does not fail (default behaviour). Details here:The default behaviour prevents two Deployments from two different CodeDeploy "Applications" writing the same file and possibly causing some sort of conflict.