Q77 — AWS DVA-C02 Ch.2
Question 77 of 100 | ← Chapter 2
What is the execution order of hooks for in-place deployments using AWS CodeDeploy?
- A. BeforeInstall -> ApplicationStop -> ApplicationStart -> AfterInstall
- B. ApplicationStop -> BeforeInstall -> AfterInstall -> ApplicationStart ✓
- C. BeforeInstall -> ApplicationStop -> ValidateService -> ApplicationStart
- D. ApplicationStop -> BeforeInstall -> ValidateService -> ApplicationStart
Correct Answer: B. ApplicationStop -> BeforeInstall -> AfterInstall -> ApplicationStart
Explanation
For in-place deployments, AWS CodeDeploy executes hooks in the following strict sequence: ApplicationStop (stops the application), BeforeInstall (runs before installing new artifacts), AfterInstall (runs after installation completes), and finally ApplicationStart (restarts the application). ValidateService is not a standard CodeDeploy hook for in-place deployments. Therefore, Option B is correct.