0
votes

I tried it for 2 cases

Using github as repository

  1. Fresh deployment using codepipeline to desired location multiple time : files are overwritten automatically in this case by code deploy agent.

  2. When files are manually created at install location(/var/www/html) then codedeploy throws error "The deployment failed because a specified file already exists at this location: /var/www/html/abc.php"

I am not able to overwrite files using for 2nd case ,

tried : overwrite:true -> this is not working

appspec.yml file

version: 0.0
os: linux
files:
  - source: /
    destination: /var/www/html/
    overwrite: true
    
1
Error : The deployment failed because a specified file already exists at this location: /var/www/html/ - Sahil Kapoor

1 Answers

0
votes

This will work.

version: 0.0
os: linux
files:
  - source: /
    destination: /var/www/html/
file_exists_behavior: OVERWRITE