Courseiva
DeploymenteasyMultiple ChoiceObjective-mapped

DVA-C02 Deployment Practice Question

A company wants to deploy a serverless application using AWS Lambda and API Gateway. The deployment process must support automatic rollbacks if the new version fails CloudWatch alarms. Which AWS service should be used to orchestrate this deployment?

⚠ Common exam trap

A common mix-up: candidates confuse CodePipeline (which orchestrates the overall pipeline) with CodeDeploy (which handles the actual deployment and rollback logic), leading them to select CodePipeline even though it lacks native automatic rollback based on CloudWatch alarms.

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

AWS CodeDeploy

AWS CodeDeploy is the correct choice because it natively supports deployment strategies like canary, linear, and all-at-once, and can be configured with CloudWatch alarms to automatically trigger rollbacks when a new version fails. This makes it ideal for serverless applications using Lambda and API Gateway, where you need safe, automated deployments with health-check-driven rollback capabilities.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • AWS Elastic Beanstalk

    Why it's wrong here

    AWS Elastic Beanstalk is designed for deploying and managing traditional web applications and services on familiar servers or containerized applications. It provisions and manages underlying compute resources such as EC2 instances and load balancers, making it fundamentally unsuitable for deploying serverless AWS Lambda functions. Its operational model is centered around persistent servers, not ephemeral, event-driven functions, and it lacks native support for Lambda's deployment lifecycle.

  • AWS CodeDeploy

    Why this is correct

    AWS CodeDeploy is the correct choice because it natively supports advanced deployment strategies for AWS Lambda functions, including canary and linear deployments. It facilitates gradual traffic shifting to new Lambda function versions, allowing for real-time monitoring of performance and errors. Crucially, CodeDeploy integrates with Amazon CloudWatch alarms to automatically roll back to the deployment to the previous stable version if predefined error thresholds are exceeded during the deployment, ensuring application stability and minimizing user impact.

  • AWS CloudFormation with a change set

    Why it's wrong here

    While AWS CloudFormation is excellent for provisioning and updating serverless resources, including Lambda functions, its change set mechanism performs an all-at-once update to the stack. It lacks the inherent capability to manage gradual traffic shifting between different Lambda function versions for canary deployments. CloudFormation does not provide built-in logic for automatic rollbacks based on runtime metrics or CloudWatch alarms during the deployment process itself, making it insufficient for sophisticated, risk-mitigated updates.

  • AWS CodePipeline

    Why it's wrong here

    AWS CodePipeline serves as an orchestration service for automating the entire continuous integration and continuous delivery (CI/CD) workflow across various stages. While it can integrate with AWS CodeDeploy to execute advanced deployment strategies for Lambda, CodePipeline itself does not directly perform the canary deployment or manage the traffic shifting. It also does not inherently monitor CloudWatch alarms for automated rollbacks; rather, it triggers other services like CodeDeploy to handle these specific deployment mechanics within a pipeline stage.

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

About these practice questions

This DVA-C02 question is part of Courseiva's 724-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 →

How Courseiva writes practice questions · Editorial policy

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.