AWS Certified Developer – Associate — Question 411
For a deployment using AWS CodeDeploy, what is the run order of the hooks for in-place deployments?
Answer options
- A. Before Install -> Application Stop -> Application Start -> After Install
- B. Application Stop -> Before Install -> After Install -> Application Start
- C. Before Install -> Application Stop -> Validate Service -> Application Start
- D. Application Stop -> Before Install -> Validate Service -> Application Start
Correct answer: B
Explanation
During an in-place deployment in AWS CodeDeploy, the lifecycle begins by stopping the active application version using the ApplicationStop hook. This is followed by the BeforeInstall hook to prepare the environment, the AfterInstall hook once files are copied, and finally the ApplicationStart hook to launch the updated service. Other options are incorrect because they place the stopping mechanism after the installation phase or put the start phase before post-installation tasks.