DVA-C02 Deployment Practice Question
A developer is deploying a new version of an AWS Lambda function. The function is behind an API Gateway endpoint. The developer wants to use canary deployments to gradually shift traffic to the new version. Which TWO steps should the developer perform?
⚠ Common exam trap
It's easy for candidates to think canary deployments require separate infrastructure (like CloudFront or multiple stages), but AWS Lambda aliases with routing configuration provide a built-in, serverless-native mechanism for percentage-based traffic shifting without additional services.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Create a Lambda alias that points to the current version and configure routing to shift a percentage of traffic to the new version.
Lambda aliases support traffic shifting for canary deployments by allowing you to route a percentage of incoming requests to a new function version while the majority continues to the current version. This is done by configuring the alias's routing configuration with a `RoutingConfig` that specifies the new version and the weight (e.g., 5%) of traffic it should receive. This enables gradual, controlled rollouts without modifying the API Gateway integration endpoint. Option C is also necessary because the API Gateway integration must point to the Lambda alias (rather than a fixed version) so that the routing configuration on the alias can take effect. Without updating the integration to use the alias, API Gateway would continue to invoke a specific version directly, bypassing the canary routing.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Create a Lambda alias that points to the current version and configure routing to shift a percentage of traffic to the new version.
Why this is correct
An AWS Lambda alias provides a stable endpoint for your function while allowing you to manage traffic distribution across different versions. By configuring the alias to point to both the current and the new Lambda versions with a weighted routing strategy, a developer can gradually shift a small percentage of traffic to the new version. This enables a controlled canary deployment, allowing for real-time monitoring and quick rollback if issues arise, minimizing impact on users.
- ✗
Configure Amazon CloudFront to distribute traffic between two API Gateway endpoints.
Why it's wrong here
Amazon CloudFront is primarily a content delivery network (CDN) used for caching and distributing web content and API responses globally, not for managing the underlying versioning and traffic distribution of AWS Lambda functions directly. While CloudFront can route requests to different API Gateway origins, it does not provide the granular, real-time weighted traffic shifting capabilities for Lambda versions that are natively offered by Lambda aliases. Using CloudFront for this purpose would introduce unnecessary complexity and an indirect management layer.
- ✓
Update the API Gateway integration to point to the Lambda alias instead of a specific version.
Why this is correct
To effectively leverage the traffic shifting capabilities of Lambda aliases for canary deployments, the API Gateway integration must be configured to invoke the Lambda alias ARN, rather than a specific Lambda function version. This setup ensures that all requests directed to the API Gateway endpoint are then routed by the Lambda alias according to its defined weights, transparently directing traffic to the appropriate Lambda function version. This decouples the API Gateway configuration from specific Lambda version updates, simplifying deployments.
- ✗
Update the Lambda function code and publish a new version.
Why it's wrong here
Updating the Lambda function code and publishing a new version successfully creates an immutable snapshot of your function's code and configuration, assigning it a unique version number. However, this action alone does not automatically direct any incoming invocation traffic to this newly published version. Without further configuration, such as updating an alias to include the new version or directly updating an event source mapping, the new version remains inactive for production traffic, failing to implement a gradual rollout strategy.
- ✗
Create a new API Gateway stage for the new version and update DNS.
Why it's wrong here
Creating a new API Gateway stage for each new Lambda version and then attempting to manage traffic distribution through DNS updates is an overly complex and inefficient approach for canary deployments. DNS propagation delays can hinder rapid traffic shifting and rollback, making real-time monitoring and response difficult. Lambda aliases offer a much more integrated, granular, and immediate mechanism for weighted traffic distribution between function versions, specifically designed for this type of progressive deployment strategy without requiring DNS changes.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
About these practice questions
Courseiva writes every DVA-C02 question from scratch — 724 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.