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

zawhtutwin

Zaw Htut Win

Posted on March 11, 2022

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

This is my sample appspec.yml


    version: 0.0
    os: linux
    files:
      - 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.

💖 💪 🙅 🚩
zawhtutwin
Zaw Htut Win

Posted on March 11, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related