AWS Certified Developer – Associate / Question #870 of 557

Question #870

A company uses an Amazon API Gateway HTTP API that triggers AWS Lambda functions to handle user requests. The company needs to test a new version of the Lambda functions with 10% of its user traffic before full deployment. The testing must be isolated from the remaining 90% of users and require minimal operational overhead.

Which solution meets these requirements with the LEAST operational effort?

A

Create a new Lambda function version and configure an alias with a 10% traffic weight. Update the API Gateway integration to use the alias ARN for the Lambda function.

B

Create a new deployment stage in API Gateway with canary settings. Specify 10% of the HTTP API traffic to route to the new Lambda function version while keeping the rest on the original stage.

C

Use AWS CodeDeploy to create a deployment group with a canary configuration. Gradually shift 10% of the Lambda function traffic to the new version over time.

D

Build a new HTTP API in API Gateway with a Lambda integration for the new function version. Use Amazon Route 53 weighted routing to direct 10% of user traffic to the new API.

Explanation

Option B is correct because Amazon API Gateway's canary deployment feature enables traffic splitting between stages. By creating a new deployment stage with canary settings, 10% of traffic is routed to the new Lambda version while 90% remains on the original stage. This approach requires minimal operational effort as it uses built-in API Gateway functionality without needing additional services like AWS CodeDeploy or Route 53.

Option A involves managing Lambda aliases and updating API Gateway integrations, which adds complexity. Option C introduces AWS CodeDeploy, requiring more setup and management. Option D requires maintaining two APIs and configuring DNS routing via Route 53, increasing operational overhead. API Gateway's canary deployments (Option B) provide the simplest, most efficient solution for gradual traffic shifting with isolation.

Answer

The correct answer is: B