Skip to main content

DVA-C02 practice question · Deployment

In a CodeDeploy AppSpec file for an EC2/on-premises deployment, in which lifecycle event should a developer typically…

In a CodeDeploy AppSpec file for an EC2/on-premises deployment, in which lifecycle event should a developer typically stop the application service before new files are copied?

  • AApplicationStop
  • BApplicationStart
  • CValidateService
  • DBeforeBlockTraffic
Show the answer and explanation

Correct answer: A) ApplicationStop

Why each option is right or wrong

  • A) Correct. ApplicationStop runs before the new application revision's files are copied, making it the correct place to gracefully stop the currently running application.
  • B) Incorrect. ApplicationStart runs after the new files are already in place and is used to start the new version, not stop the old one beforehand.
  • C) Incorrect. ValidateService runs after ApplicationStart to verify the deployment succeeded; it isn't when the old application should be stopped.
  • D) Incorrect. BeforeBlockTraffic runs just before an instance is deregistered from a load balancer, a different point in the lifecycle than stopping the application service ahead of file copy.
Exam domain
Deployment · 24% of DVA-C02
Question type
Multiple choice (one answer)

Practise the full DVA-C02 exam

This question is one of a small free sample from the CertRidge DVA-C02 bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.

Original question written from the official exam guide. Not affiliated with AWS; never copied from the real exam.

Worth reading: DVA-C02 cheat sheet, Lambda, DynamoDB, API Gateway, IAM and Cognito, messaging, CI/CD and X-Ray in tables, plus what DVA-C03 changes.