How to Test Updated Lambda Functions with a Subset of Users Using API Gateway?
A company has a mobile app. The app includes an Amazon API Gateway REST API that invokes AWS Lambda functions. The Lambda functions process data from the app. The company needs to test updated Lambda functions that have new features. The company must conduct these tests with a subset of users before deployment. The tests must not affect other users of the app. Which solution will meet these requirements with the LEAST amount of operational effort?
Community Votes
51% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The question evaluates understanding of Lambda versioning and weighted aliases for traffic shifting, highlighting the trap of over-engineering with new APIs or CodeDeploy when a simple alias update suffices.
This question tests the most efficient way to perform canary testing of updated AWS Lambda functions behind an Amazon API Gateway REST API using weighted aliases, minimizing operational overhead while isolating a subset of users.
Many candidates choose Option B, assuming API Gateway canary settings require less effort, but creating a new REST API and configuring proxy integrations for multiple Lambda functions adds unnecessary complexity and operational overhead.
Community Discussion (19 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Understanding the Requirement
The scenario requires testing updated Lambda functions with a subset of users before full deployment, ensuring no impact on other users, and achieving this with the LEAST operational effort. This is a classic canary deployment or traffic shifting use case.
Why Option A is Correct
Option A leverages Lambda weighted aliases, a native feature designed precisely for this purpose:
- Create a new version of the Lambda function.
- Assign a weighted alias pointing to both the old and new versions with specified traffic percentages (e.g., 90% to old, 10% to new).
- Update the API Gateway integration to use the alias ARN instead of the function name or version ARN.
Why Other Options Are Incorrect
- Option B: Suggests creating a new REST API and using canary settings on the deployment stage. While API Gateway does support canary deployments, creating an entirely new API introduces significant operational overhead—duplicating resources, managing separate endpoints, and coordinating deployments. This contradicts the "LEAST operational effort" requirement.
- Option C: Proposes using AWS CodeDeploy for automated canary deployments. While CodeDeploy is powerful for EC2 or ECS deployments, using it for Lambda functions behind API Gateway adds unnecessary complexity. CodeDeploy is better suited for infrastructure-level deployments, not API traffic shifting.
- Option D: Similar to Option B but with non-proxy integration, which requires manual mapping of request/response parameters. This is even more complex than proxy integration and definitely not the least-effort solution.
Community Consensus
The community is split (50% A, 48% B), with many candidates initially attracted to Option B due to the phrase "LEAST operational effort." However, as noted by multiple commenters, creating a new REST API (Options B and D) inherently involves more work than simply updating an alias ARN in the existing API configuration. Option A is the most straightforward and aligns with AWS best practices for Lambda traffic shifting.
Official Reference
Exam Strategy
When a question emphasizes 'LEAST operational effort,' avoid solutions that require creating new infrastructure (e.g., new APIs, new services). Look for native, lightweight features like weighted aliases that achieve the goal with minimal configuration changes.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →