Deployment, Provisioning, and Automation
A team uses AWS CodeDeploy to deploy an application revision to EC2 instances. Where should the team define file destinations and scripts that run during deployment lifecycle events?
Show the answer
Correct answerB. In an AppSpec file
AWhy not this: A CloudFormation template declares infrastructure resources rather than application file mappings and deployment hooks.
BWhy this is right: An AppSpec file specifies where application files go and which scripts run at deployment lifecycle events.
CWhy not this: A buildspec file controls CodeBuild build phases rather than CodeDeploy deployment lifecycle events.
DWhy not this: An image recipe defines components and settings for building images, not CodeDeploy lifecycle behavior.
An AppSpec file defines file mappings and lifecycle event hooks for CodeDeploy deployments to EC2 instances. A buildspec file defines CodeBuild build commands, not CodeDeploy deployment instructions.