Deployment Strategies

83 questions

Question 81Question

A developer is managing an application deployed on a fleet of 10 Amazon EC2 instances using AWS CodeDeploy. The application must maintain a minimum of 8 healthy instances at all times during a deployment to handle peak traffic loads. To minimize the overall deployment duration as much as possible while strictly adhering to this capacity constraint, which CodeDeploy deployment configuration should the developer choose?

Show answer & explanation

Answer: A custom deployment configuration with the minimum healthy hosts set to 80%.

Answer

A custom deployment configuration with the minimum healthy hosts set to 80%.
A custom deployment configuration specifying a minimum of 80% healthy hosts allows CodeDeploy to update 2 instances in parallel. This is the fastest way to deploy the update because it maximizes the number of parallel updates (2 instances) while guaranteeing that the remaining 8 instances (80%) stay online and healthy, satisfying the customer constraint.

Step-by-Step Solution

1
Identify the minimum capacity requirement from the scenario constraints.
The application runs on 10 EC2 instances and requires at least 8 instances to remain healthy, which equates to 8/10=80%8/10 = 80\% minimum healthy capacity.
This determines the lower bound of healthy resources required during the update process.
2
Calculate the maximum number of instances that can be updated concurrently.
Subtracting the required healthy instances from the total fleet size (108=210 - 8 = 2), we find that a maximum of 2 instances can be offline/updating at any given time.
To minimize deployment duration, we must maximize parallel updates without dropping below the capacity floor.
3
Evaluate the default CodeDeploy deployment configurations against the constraints.
CodeDeployDefault.OneAtATime updates 1 instance at a time (slower). CodeDeployDefault.HalfAtATime updates 5 instances at a time (violates the healthy host constraint). CodeDeployDefault.AllAtOnce updates 10 instances at a time (causes complete downtime).
To verify if any built-in default configurations can optimize the deployment time while maintaining safety.
4
Select the optimal configuration that meets all criteria.
A custom deployment configuration with minimum healthy hosts set to 80% (or 8 hosts) is selected as it allows 2 parallel updates, making it faster than the OneAtATime configuration.
Custom configurations are necessary when default configurations either violate safety constraints or perform suboptimally.

Key Concept

AWS CodeDeploy deployment configurations and capacity management
Estimated Time:1m 30s
Question 82Question

A developer has a production API hosted on Amazon API Gateway and wants to introduce a new API version. To minimize risk, the developer needs to route 5%5\% of the API traffic to the new version using the same endpoint, while the remaining 95%95\% continues to go to the current version. The developer wants to monitor the performance of the new version and must be able to immediately roll back all traffic to the current version if any anomalies are detected. Which deployment approach should the developer use to meet these requirements?

Show answer & explanation

Answer: Enable canary settings on the existing API Gateway stage, set the canary traffic percentage to 5%5\%, and delete the canary deployment if any anomalies are detected.

Answer

Enable canary settings on the existing API Gateway stage, set the canary traffic percentage to 5%5\%, and delete the canary deployment if any anomalies are detected.
Enabling canary settings on an existing API Gateway stage allows a developer to route a small percentage of traffic (such as 5%5\%) to a new deployment using the same endpoint. If anomalies occur, deleting the canary deployment immediately routes all traffic back to the stable production version, satisfying the rollback requirement.

Step-by-Step Solution

1
Identify the requirement for percentage-based traffic routing on a single API endpoint.
The solution must support shifting 5%5\% of traffic to the new version and 95%95\% to the current version under the same stage endpoint.
Clients must access the API using the existing configuration without needing distinct URLs.
2
Evaluate the native deployment capabilities of Amazon API Gateway.
API Gateway offers stage-level canary settings, allowing traffic to be split between a production deployment and a canary deployment on the same stage.
This avoids external routing layers and provides native support for canary testing.
3
Determine the optimal rollback mechanism.
If anomalies occur, deleting the canary settings or deployment on the stage immediately redirects all traffic back to the primary production deployment.
This ensures the rollback is instantaneous, meeting the requirement without suffering from DNS propagation delays.

Key Concept

API Gateway Canary Deployments
Estimated Time:1m 15s
Question 83Question

A company runs a critical web application on AWS Elastic Beanstalk. The application must maintain 100%100\% of its capacity to handle peak traffic during updates. Additionally, if the new version fails post-deployment, the developer must be able to roll back to the previous version immediately with minimal service impact and without triggering a new application deployment.

Which two Elastic Beanstalk deployment strategies meet these requirements? (Select TWO).

Select all that apply

Show answer & explanation

Answer: Blue/Green deployment; Immutable deployment

Answer

Blue/Green deployment and Immutable deployment
Blue/Green deployment and Immutable deployment are correct because both strategies keep the original, healthy application instances running at 100%100\% capacity while the new version is deployed and verified. In Blue/Green, a CNAME swap directs traffic to the new environment, and rolling back is as simple as swapping CNAMEs back. In Immutable, a temporary Auto Scaling group is created, and if the deployment fails, the temporary instances are terminated, instantly reverting traffic to the original instances without needing a new deployment.

Step-by-Step Solution

1
Analyze the capacity requirement.
Since the application must maintain 100%100\% capacity, strategies that take existing instances offline without first adding capacity (such as Rolling and All-at-once) are ruled out.
To identify strategies that prevent latency spikes under peak load.
2
Analyze the rollback requirement.
The requirement specifies rollback without triggering a new deployment. In-place strategies (like Rolling with additional batch) require deploying the old version package again. Only strategies that keep the old environment/instances completely intact (Blue/Green and Immutable) support immediate rollback by swapping CNAMEs or terminating the new Auto Scaling group.
To identify strategies that avoid the overhead and time of redeploying the previous version in a failure scenario.

Key Concept

Elastic Beanstalk deployment strategies and their trade-offs regarding capacity and rollback mechanics.
Estimated Time:1m 30s
PreviousPage 5 / 5
Deployment Strategies Practice Questions — AWS Certified Developer - Associate — Page 5 | Examkin