AWS Certified Solutions Architect Professional SAP-C02 Practice Question
A retail company runs multiple stateless microservices on Amazon ECS using the Fargate launch type. Each service is fronted by an Application Load Balancer (ALB).
Change-management policy:
New container images must receive exactly 10 percent of production traffic for 5 minutes; if no issues occur, the remaining traffic is shifted automatically.
If the ALB's HTTP 5xx error rate exceeds a predefined CloudWatch alarm threshold during the traffic shift, the deployment must immediately roll back to the previous task set without human intervention.
The solution must integrate with the company's existing AWS CodePipeline build stages and must not rely on custom scripts or third-party tools.
Which approach satisfies these requirements?
Use a CloudFormation update action in CodePipeline to update the ECS service with deployment circuit breaker enabled. Set maximumPercent to 110 and minimumHealthyPercent to 90, and configure the same CloudWatch alarm to stop the deployment.
Add a Deploy action to AWS CodePipeline that invokes AWS CodeDeploy blue/green deployments for the ECS service. Configure the deployment group with the predefined deployment configuration CodeDeployDefault.ECSCanary10Percent5Minutes, attach the ALB 5xx CloudWatch alarm, and enable automatic rollback on alarm.
Migrate the service to AWS Elastic Beanstalk and enable immutable environment deployments. Configure a CloudWatch 5xx alarm and turn on automatic rollback in the Beanstalk environment.
Insert an AWS Step Functions stage in CodePipeline that updates Route 53 weighted DNS records to send 10 percent of traffic to a green ECS service for 5 minutes, then shifts or reverts traffic based on the CloudWatch alarm state.
AWS CodeDeploy's blue/green deployment type for Amazon ECS provides predefined canary configurations (such as CodeDeployDefault.ECSCanary10Percent5Minutes) that shift 10 percent of traffic to a replacement task set for 5 minutes and then route the remainder if no alarms fire. A CloudWatch alarm for the ALB's HTTP 5xx metric can be attached to the deployment group, and automatic rollback can be enabled so that CodeDeploy restores the last known-good task set when the alarm enters the ALARM state. The Deploy action in AWS CodePipeline natively supports invoking CodeDeploy, so no custom orchestration or third-party tooling is required.
ECS rolling updates with the deployment circuit breaker can roll back unhealthy deployments, but they control task replacement, not percentage-based traffic shifting, so the 10 percent canary requirement is not guaranteed. Elastic Beanstalk immutable updates deploy an entirely new environment and only route traffic after health checks pass; they do not provide a 10 percent traffic canary. A Step Functions-based DNS weight-shifting solution could meet the functional goals, but it introduces additional services and custom logic, violating the requirement to avoid extra orchestration.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is AWS CodeDeploy blue/green deployment?
Open an interactive chat with Bash
How does AWS CloudWatch integrate with CodeDeploy to monitor deployments?
Open an interactive chat with Bash
What is the difference between a rolling update and a blue/green deployment in ECS?
Open an interactive chat with Bash
AWS Certified Solutions Architect Professional SAP-C02
Design for New Solutions
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access