I tried it for 2 cases
Using github as repository
Fresh deployment using codepipeline to desired location multiple time : files are overwritten automatically in this case by code deploy agent.
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