version: 0.0 os: linux # Make sure that "destination" is not same for two different Code Deploy Groups/Deployments. files: - source: / destination: /home/ec2-user/server2 permissions: - object: / pattern: "**" owner: ec2-user group: ec2-user hooks: BeforeInstall: - location: install_dependencies.sh timeout: 300 runas: ec2-user ApplicationStop: - location: stop.sh timeout: 20 runas: ec2-user ApplicationStart: - location: start.sh timeout: 20 runas: ec2-user ValidateService: - location: validate.sh timeout: 20 runas: ec2-user