DVA-C02 Deployment Practice Question
A developer is deploying a serverless application using AWS SAM. The application consists of an API Gateway REST API and multiple AWS Lambda functions. The developer wants to deploy the application to a production environment with minimal downtime. Which deployment strategy should the developer use?
⚠ Common exam trap
DVA-C02 often tests the misconception that SAM can perform rolling updates on Lambda functions like EC2 Auto Scaling groups, when in fact Lambda uses versions and aliases with traffic shifting.
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 SAM's built-in canary deployment with traffic shifting.
AWS SAM supports built-in canary deployments with traffic shifting, which gradually routes a percentage of traffic to the new version while monitoring CloudWatch alarms. This minimizes downtime and allows automatic rollback if errors occur. It is the recommended strategy for serverless applications on API Gateway and Lambda.
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 blue/green deployment using AWS Elastic Beanstalk.
Why it's wrong here
AWS Elastic Beanstalk is a platform-as-a-service designed for deploying and scaling traditional web applications and services, typically running on EC2 instances. It manages environments, load balancers, and auto-scaling groups, which are not the primary components of a serverless Lambda-based application. Therefore, using Elastic Beanstalk for a serverless Lambda deployment is fundamentally misaligned with its purpose and capabilities.
- ✗
Delete the existing stack and deploy a new one.
Why it's wrong here
Deleting an existing CloudFormation stack and then deploying a new one is a destructive operation that causes significant downtime for a serverless application. All resources, including Lambda functions, API Gateway endpoints, and potentially data stores, are removed and then recreated. This approach is unacceptable for production environments requiring high availability, as it leads to service interruption and potential data loss during the transition.
- ✗
Perform a rolling update by updating functions one by one.
Why it's wrong here
Performing a 'rolling update' by manually updating individual Lambda functions one by one is not a standard or efficient deployment strategy within the AWS serverless ecosystem, especially when using SAM. Lambda functions are versioned, and traffic is managed via aliases, not by individually updating running instances in a rolling fashion like traditional compute instances. SAM and CloudFormation manage deployments at the stack or version level, making this manual approach impractical and prone to errors.
- ✓
Use SAM's built-in canary deployment with traffic shifting.
Why this is correct
SAM's built-in canary deployment, integrated with AWS CodeDeploy, provides a robust mechanism for safely deploying serverless applications with gradual traffic shifting. This strategy allows a small percentage of traffic to be routed to the new Lambda version while monitoring for errors via CloudWatch alarms. If issues arise, CodeDeploy can automatically roll back to the previous stable version, minimizing impact and ensuring high availability during updates.
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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint
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.