DOP-C02 Configuration Management and IaC Practice Question
A company uses AWS CloudFormation to deploy a multi-tier application. The template includes an Amazon RDS DB instance. The DevOps team wants to update the DB instance class without downtime. What should they do?
⚠ Common exam trap
Candidates often assume 'ApplyImmediately: true' is a valid zero-downtime solution, but in reality it triggers an immediate reboot for instance class changes, causing downtime, whereas blue/green deployments are the correct AWS-native method for minimizing downtime during such modifications.
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
✓
Modify the DB instance class using an RDS blue/green deployment, then update the CloudFormation stack to match the new class.
RDS blue/green deployments allow you to make changes (such as modifying the DB instance class) with minimal downtime by creating a staging environment that mirrors the production environment. After the change is applied and verified, the blue/green deployment switches traffic to the new environment, ensuring zero or near-zero downtime. Subsequently, updating the CloudFormation stack to match the new class keeps the infrastructure code in sync with the actual deployed resources.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use a CloudFormation stack update with a 'ReplaceOnDelete' deletion policy on the DB instance.
Why it's wrong here
A DeletionPolicy is a CloudFormation resource-level attribute that controls the fate of a resource when the stack is deleted (e.g., Retain, Snapshot), not a mechanism for modifying a live resource during an update. 'ReplaceOnDelete' is not a recognized DeletionPolicy value nor a CloudFormation property on AWS::RDS::DBInstance. Even if it existed, it would only affect what happens upon deletion, not trigger a replacement or class change, so it does nothing to change the DB instance class.
- ✗
Create a new DB instance with the new class, update the application to point to the new endpoint, and delete the old instance.
Why it's wrong here
Manually creating a new DB instance and repointing the application is error-prone and typically causes data loss unless you carefully orchestrate a snapshot restore and then handle all writes that occurred between the snapshot and cutover. You also have to manually manage DNS/endpoint migration, connection-pool draining, and possibly re-seeding — none of which CloudFormation tracks, leading to stack/resource drift. This operational overhead and risk make it a poor substitute for a managed, near-zero-downtime deployment.
- ✗
Update the DBInstanceClass property in the CloudFormation template and set 'ApplyImmediately: true'.
Why it's wrong here
Updating the DBInstanceClass property in a CloudFormation template initiates a modification to the RDS instance, but RDS requires a reboot for the new class to take effect; setting ApplyImmediately: true forces that reboot to occur immediately instead of during the next maintenance window. The reboot causes database downtime, breaking availability for your multi-tier application, especially if the instance is a single-AZ deployment. Thus, this approach does not meet the goal of a disruption-free class change.
- ✓
Modify the DB instance class using an RDS blue/green deployment, then update the CloudFormation stack to match the new class.
Why this is correct
RDS Blue/Green Deployments let you provision a staging 'green' environment that stays synchronized with the production 'blue' environment via logical replication, allowing you to change the DB instance class in the green environment with zero impact on production. After validation, you perform a switchover that flips the endpoint with minimal downtime and no data loss. Then you update the CloudFormation stack's DBInstanceClass property to match the new instance class, ensuring your infrastructure-as-code template reflects the actual state and preventing drift.
Go deeper
Related to this question
About these practice questions
One of 1,298 original DOP-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on DOP-C02
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A company uses AWS CloudFormation to deploy a multi-tier application. The stack includes an Application Load Balancer (ALB), an Auto Scaling group, and an RDS database. The DevOps engineer needs to update the stack to change the DB instance type. The engineer wants to minimize downtime. Which strategy should they use?
medium- A.Create a new CloudFormation stack with the new DB instance type and update DNS to point to the new DB
- ✓ B.Create a new DB instance with the new type, update the application stack to point to the new DB, then remove the old DB
- C.Modify the DB instance to use Multi-AZ deployment before the update
- D.Update the stack directly by changing the DBInstanceType property
Why B: It minimizes downtime by provisioning a new DB instance with the desired type in parallel, updating the application stack to reference the new DB endpoint (e.g., via a CloudFormation parameter or SSM parameter), and then decommissioning the old instance. This avoids any interruption to the existing database during the transition, as the old DB remains fully operational until the application is switched over.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DOP-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 DOP-C02 exam.