DVA-C02 Deployment Practice Question
A team wants CloudFormation to prevent accidental deletion of a production DynamoDB table during stack updates. What should they configure?
⚠ Common exam trap
Many exam-takers confuse operational settings (like write capacity) or unrelated services (Lambda layers, API Gateway) with CloudFormation's resource lifecycle policies, missing the direct purpose of DeletionPolicy and UpdateReplacePolicy.
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
✓
DeletionPolicy or UpdateReplacePolicy Retain as appropriate
The DeletionPolicy attribute with a value of Retain instructs AWS CloudFormation to preserve the DynamoDB table when its stack resource is deleted during a stack update or stack deletion. Similarly, UpdateReplacePolicy Retain ensures that if a resource replacement is required during an update, the existing table is kept rather than deleted. This directly prevents accidental data loss by overriding CloudFormation's default behavior of deleting resources that are removed from the template or replaced.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
A larger write capacity setting
Why it's wrong here
Increasing the write capacity setting, typically for a DynamoDB table, is a performance-related configuration designed to handle higher volumes of write operations per second. This adjustment ensures the database can scale to meet application demands without throttling or encountering throughput exceptions. However, modifying the write capacity has no direct impact on preventing the accidental deletion of the DynamoDB table or any other resource managed by CloudFormation, as it addresses operational performance rather than resource lifecycle protection.
- ✗
A Lambda layer
Why it's wrong here
A Lambda layer is a deployment package that contains libraries, a custom runtime, or other dependencies shared across multiple Lambda functions. While a layer is itself an AWS resource managed by CloudFormation, its primary function is to facilitate code reuse and reduce deployment package size, not to provide a mechanism for preventing the accidental deletion of other CloudFormation resources or even the layer itself. Setting up a layer does not inherently offer any deletion protection capabilities for resources within a CloudFormation stack.
- ✗
An API Gateway usage plan
Why it's wrong here
An API Gateway usage plan is a configuration that enables you to specify who can access one or more deployed API stages and how much they can access. It controls throttling, quotas, and API keys for client applications, ensuring fair usage and preventing abuse. While usage plans are CloudFormation-manageable resources, their purpose is solely for access management and rate limiting of API consumers, offering no mechanism to prevent the accidental deletion of the API Gateway itself, the usage plan, or any other resource within a CloudFormation stack.
- ✓
DeletionPolicy or UpdateReplacePolicy Retain as appropriate
Why this is correct
CloudFormation provides the `DeletionPolicy` and `UpdateReplacePolicy` attributes specifically to control the lifecycle of resources during stack operations. Setting `DeletionPolicy` to `Retain` ensures that a resource is not deleted when its containing stack is deleted or the resource is removed from the template. Similarly, `UpdateReplacePolicy` set to `Retain` prevents the old physical resource from being deleted if it is replaced during a stack update, directly addressing the requirement to prevent accidental resource deletion.
Go deeper
Related to this question
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 →
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.