DVA-C02 Deployment Practice Question
Which TWO deployment methods can be used to update an AWS Lambda function with no downtime? (Select TWO.)
⚠ Common exam trap
Test-takers frequently think update-function-code is a safe deployment method, but it modifies the mutable $LATEST version, which can cause downtime if an alias points to $LATEST and the update is not atomic.
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
✓
Use a weighted alias to gradually shift traffic to a new version.
A weighted alias allows you to route a small percentage of traffic to a new Lambda version while keeping the majority on the current version, enabling canary deployments with zero downtime. Option C is correct because creating a new version and updating the alias to point to it performs an instant, atomic switch, ensuring all traffic is served by the new version without any interruption.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Update the function code using update-function-code.
Why it's wrong here
This method directly modifies the $LATEST version of the Lambda function. While it updates the code, it does not provide a mechanism for zero-downtime deployments or easy rollbacks. During the update, invocations might experience brief cold starts or inconsistent behavior as the underlying execution environment is refreshed, making it unsuitable for production environments requiring continuous availability.
- ✓
Use a weighted alias to gradually shift traffic to a new version.
Why this is correct
This deployment method enables a canary release strategy, ensuring zero downtime. A new Lambda function version is published, and an alias is configured to distribute traffic between the existing stable version and the new version based on specified weights (e.g., 90% old, 10% new). This allows for gradual rollout, real-time monitoring of the new version's performance, and immediate rollback by adjusting weights if issues arise.
- ✓
Create a new version and update the alias to point to the new version.
Why this is correct
This approach facilitates an atomic, blue/green deployment strategy. A new, immutable version of the Lambda function is published with the updated code. An existing alias, which previously pointed to the old stable version, is then atomically updated to point entirely to this new version. This instantly switches all traffic to the new version without any downtime, providing a clean cutover.
- ✗
Create a new Lambda function and delete the old one.
Why it's wrong here
This method is highly disruptive and not recommended for updating an existing function without downtime. It involves creating an entirely new Lambda function resource, requiring all event sources (e.g., API Gateway, S3, SQS) and downstream consumers to be reconfigured to point to the new function's ARN. During this transition, the old function might still receive invocations while the new one is not yet fully configured, leading to significant downtime, invocation failures, and operational complexity.
- ✗
Update the function configuration to increase memory.
Why it's wrong here
While increasing memory is a valid configuration change for a Lambda function, it does not constitute a method for updating the function's code. This action only modifies the allocated resources for the function's execution environment, impacting performance and cost, but it does not deploy new code or a new version of the application logic. The question specifically asks about methods to update the function itself, implying code 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
This DVA-C02 question is part of Courseiva's 1,135-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.