20+ practice questions focused on Deployment — one of the most tested topics on the AWS Certified Developer Associate DVA-C02 exam. Each question includes a detailed explanation so you learn why the right answer is correct.
Start Deployment PracticeA developer is deploying a serverless application using the AWS Serverless Application Model (SAM). The application includes an Amazon API Gateway HTTP API and several AWS Lambda functions. The developer wants to implement a canary deployment for the API Gateway stage so that 10% of traffic is shifted to the new version for 30 minutes before the remaining 90% is shifted. Which SAM resource attribute should the developer configure on the API Gateway resource?
Explanation: To implement gradual traffic shifting (such as canary or linear deployments) for Lambda functions in an AWS SAM template, you must configure the `DeploymentPreference` attribute on the `AWS::Serverless::Function` resource. Under `DeploymentPreference`, you specify the `Type` (e.g., `Canary10Percent30Minutes`), which instructs AWS CodeDeploy to manage the traffic shifting. Note that `AutoPublishAlias` is also required to enable versioning and alias creation, but `DeploymentPreference` is the specific attribute where the traffic-shifting strategy is defined.
A developer is deploying an application to Amazon ECS using AWS CodeDeploy with a blue/green deployment strategy. After the new task set is created, it fails health checks. The developer wants to immediately route traffic back to the original task set without waiting for CodeDeploy to complete the rollback process. Which action should the developer take?
Explanation: In AWS CodeDeploy blue/green deployments for ECS, if you need to immediately revert to the original task set, you must stop the deployment. Stopping an in-progress deployment automatically triggers a rollback, which reroutes traffic back to the original (blue) task set and deletes the replacement (green) task set. The 'Reroute traffic' button is only used to manually fast-track shifting traffic forward to the new task set.
A developer is deploying a new version of a web application to an EC2 Auto Scaling group using AWS CodeDeploy with a blue/green deployment strategy. The Auto Scaling group is associated with an Application Load Balancer (ALB). The developer wants to ensure that the new instances are registered with the ALB and pass health checks before any traffic is routed to them. Which CodeDeploy configuration should the developer use?
Explanation: When a load balancer (like an ALB) is configured with a CodeDeploy deployment group, CodeDeploy automatically registers the replacement instances and waits for them to pass the load balancer's health checks during the `AllowTraffic` lifecycle event. To ensure this happens as soon as the instances are ready, the developer should select 'Reroute traffic immediately'. There is no 'Wait for health check' option in CodeDeploy; health check validation is an inherent part of the deployment process when a load balancer is specified.
A developer is using AWS CodeDeploy to deploy an application to an Amazon ECS service with the Fargate launch type. The deployment uses a blue/green strategy. After the new task set is created and passes the initial health checks, the traffic is shifted to the new task set. However, the new task set is immediately replaced by the old one after a few minutes, causing a rollback. What is the most likely reason?
Explanation: In a blue/green deployment on ECS with CodeDeploy, after traffic is shifted to the new task set, CodeDeploy runs post-traffic shift validation tests (e.g., via Lambda hooks or target group health checks). If these tests fail, CodeDeploy automatically triggers a rollback by replacing the new task set with the original (old) task set. This matches the described behavior where the new task set is immediately replaced after a few minutes.
A developer is deploying a microservice using AWS CodeDeploy with an Amazon ECS compute platform. The service must be updated with a blue/green deployment strategy. The developer wants to ensure that if the deployment fails, the new task set is automatically terminated and the original task set continues to serve traffic. Which configuration should the developer set?
Explanation: AWS CodeDeploy for Amazon ECS blue/green deployments allows you to configure automatic rollback on failure within the deployment group settings. By enabling 'Rollback configuration' to automatically roll back failed deployments and setting the deployment group's blue/green deployment settings to terminate the original task set on success, you ensure that if the deployment fails, CodeDeploy rolls back, terminating the new task set and keeping the original task set to continue serving traffic.
+15 more Deployment questions available
Practice all Deployment questions1. Baseline your knowledge
Start with 10 questions to gauge your current understanding of Deployment. This tells you whether you need a concept refresher or just practice.
2. Review every explanation
For each question — right or wrong — read the full explanation. Understanding why an answer is correct is more valuable than knowing the answer itself.
3. Focus on exam traps
Deployment questions on the DVA-C02 frequently use trap wording. Look for subtle differences in answers that test your precision, not just general knowledge.
4. Reach 80% consistently
Do repeated sessions until you score 80%+ three times in a row. Then move to mixed-mode practice to test cross-topic recall under realistic conditions.
The exact number varies per candidate. Deployment is tested as part of the AWS Certified Developer Associate DVA-C02 blueprint. Practicing with targeted Deployment questions ensures you can handle any format or difficulty that appears.
Yes. Courseiva provides free DVA-C02 practice questions across all exam topics and domains. The platform includes topic-based practice, mock exams, missed-question review, bookmarked questions, and readiness tracking — no account required.
Difficulty is subjective, but Deployment is a high-priority exam concept tested in multiple ways — direct recall, scenario analysis, and command-output interpretation. Consistent practice is the best way to build confidence.
Launch a full Deployment practice session with instant scoring and detailed explanations.
Start Deployment Practice →