Question

Difficulty: MediumDeployment Strategies

A developer is deploying an updated version of a REST API to Amazon API Gateway. The developer must test the update by routing 15%15\% of production traffic to the new version. The remaining 85%85\% of traffic must continue to use the current version. The developer also needs the ability to instantly roll back the update if errors occur, or fully promote the update to production if it is successful. Which TWO configurations or actions must the developer perform to meet these requirements? (Select TWO.)

  1. Create a canary release on the existing API Gateway stage and configure the canary traffic percentage to 15%15\%.Answer
  2. Delete the canary release from the stage to roll back, or promote the canary release to make the new version the active production version.Answer
  3. C
    Configure an Amazon Route 53 weighted routing policy pointing to two different API Gateway stages, one for production (85%85\%) and one for canary (15%15\%).
  4. D
    Deploy the new API version to a new stage and configure a Lambda function with stage variables to dynamically calculate and split traffic.
  5. E
    Configure an AWS CodeDeploy deployment group with a canary configuration targeting the API Gateway stage.

Answer

To meet the requirements, the developer must create a canary release on the API Gateway stage configured to receive 15% of the traffic, and then either delete the canary release to roll back or promote it to replace the production version if successful.
Creating a canary release on the existing stage and specifying 15%15\% traffic natively implements the requested traffic split. Once configured, any new deployment to that stage routes the specified portion of traffic to the new code. Deleting the canary from the stage immediately halts the canary traffic routing and serves 100%100\% of traffic from the production version, fulfilling the instant rollback requirement. Promoting the canary upgrades the stage's production settings to point to the new deployment.

Step-by-Step Solution

1
Set up traffic shifting in API Gateway.
By creating a canary release directly on the target deployment stage and configuring it to receive 15%15\% of traffic, API Gateway automatically splits incoming traffic between the current production release (85%85\%) and the newly deployed canary release (15%15\%).
This natively meets the requirement to route a specific percentage of traffic to the new version without using external routing mechanisms.
2
Manage the lifecycle of the canary deployment.
If errors are detected during testing, deleting the canary release immediately routes 100%100\% of traffic back to the production version. If successful, promoting the canary copies the configuration to the stage, making it the new production release.
This provides instant rollback and clean promotion capabilities directly inside the API Gateway stage settings.

Key Concept

Amazon API Gateway stages support native canary releases. Enabling a canary on a stage allows a developer to route a portion of the traffic to a new deployment, test its stability, and either promote it to production or delete the canary to roll back.
Estimated Time:2m 0s
Rate this question