AWS Certified Data Engineer Associate DEA-C01 Practice Question
Your team is packaging a serverless ETL pipeline with AWS SAM. The stack contains a Lambda function that writes to a DynamoDB table storing historical sensor data that must never be deleted, even if the stack is removed or redeployed. Without introducing additional services or CLI flags, which change to the SAM template satisfies this requirement according to AWS best practices?
Pass the --retain-resources flag to sam deploy when updating the stack.
Enable point-in-time recovery on the table and rely on automatic backups.
Define the table as AWSServerlessSimpleTable and set ProvisionedThroughput: Retain.
Add the DeletionPolicy attribute with value Retain to the DynamoDB table resource definition.
AWS SAM templates are translated directly into AWS CloudFormation resources. CloudFormation provides the DeletionPolicy attribute so that a resource can be retained, snapped-shotted, or deleted when the stack is removed. Setting DeletionPolicy to Retain on the DynamoDB table resource ensures the table and its contents persist across stack deletions or updates. ProvisionedThroughput has no Retain option, the sam deploy --retain-resources flag is an ad-hoc CLI override that must be supplied on every deploy and is not embedded in the template, and enabling point-in-time recovery keeps backups but still deletes the table when the stack is deleted. Therefore, adding DeletionPolicy: Retain to the table resource is the correct solution.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the DeletionPolicy attribute in AWS CloudFormation?
Open an interactive chat with Bash
Why is adding DeletionPolicy: Retain to the template more reliable than CLI flags?
Open an interactive chat with Bash
How does DeletionPolicy differ from point-in-time recovery in DynamoDB?
Open an interactive chat with Bash
AWS Certified Data Engineer Associate DEA-C01
Data Ingestion and Transformation
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .