DOP-C02 · Question #170
DOP-C02 Question #170: Real Exam Question with Answer & Explanation
The correct answer is B: Use AWS CodeDeploy with Amazon EC2 Auto Scaling Configure an alarm tied to the CPU. Explanation Option B is correct because AWS CodeDeploy natively integrates with EC2 Auto Scaling to support rolling deployments one instance at a time (using a deployment configuration like OneAtATime), and it allows you to configure CloudWatch alarms tied to CPU utilization that
Question
A company has a mission-critical application on AWS that uses automatic scaling. The company wants the deployment lifecycle to meet the following parameters: - The application must be deployed one instance at a time to ensure the remaining fleet continues to serve traffic. - The application is CPU intensive and must be closely monitored. - The deployment must automatically roll back if the CPU utilization of the deployment instance exceeds 85%. Which solution will meet these requirements?
Options
- AUse AWS CloudFormation to create an AWS Step Functions state machine and Auto Scaling
- BUse AWS CodeDeploy with Amazon EC2 Auto Scaling Configure an alarm tied to the CPU
- CUse AWS Elastic Beanstalk for load balancing and AWS Auto Scaling. Configure an alarm tied to
- DUse AWS Systems Manager to perform a blue/green deployment with Amazon EC2 Auto Scaling.
Explanation
Explanation
Option B is correct because AWS CodeDeploy natively integrates with EC2 Auto Scaling to support rolling deployments one instance at a time (using a deployment configuration like OneAtATime), and it allows you to configure CloudWatch alarms tied to CPU utilization that automatically trigger a rollback if the threshold (85%) is exceeded - perfectly matching all three requirements.
Why the distractors are wrong:
- Option A (CloudFormation + Step Functions): While technically possible to orchestrate, this is an overly complex, custom-built solution that requires significant development effort when CodeDeploy already handles this natively.
- Option C (Elastic Beanstalk): Elastic Beanstalk does support rolling deployments and alarms, but it does not natively support automatic rollbacks triggered by CloudWatch alarm thresholds during deployments - this is a key differentiator.
- Option D (Systems Manager blue/green): Blue/green deployments spin up a new fleet rather than deploying one instance at a time to the existing fleet, which contradicts the requirement to keep the remaining fleet serving traffic during deployment.
Memory Tip 🧠
Think "CodeDeploy = Control" - whenever you see rolling deployments + automatic alarm-based rollbacks on EC2, CodeDeploy is your answer. Blue/green = new fleet; rolling/one-at-a-time = CodeDeploy.
Topics
Community Discussion
No community discussion yet for this question.