DEV Community

Zaw Htut Win
Zaw Htut Win

Posted on

AWS Code Pipeline and CodeDeploy, appspec.yml for wordpress (File already exists exception)

This is my sample appspec.yml

    version: 0.0
    os: linux
      - source: /
        destination: /var/www/wordpress/
        overwrite: true
    file_exists_behavior: OVERWRITE
Enter fullscreen mode Exit fullscreen mode

In CodeDeploy default is DISALLOW, so you will get an error if the file already exist in that location.

And this is Updated AWS User Guide for AppSpec 'files' section (EC2/On-Premises deployments only). In there you will find three options, DISALLOW,OVERWRITE and RETAIN.

Top comments (0)