A team updated a CloudFormation template for a stack that already includes a DynamoDB table. Before deploying, they accidentally changed the DynamoDB table's logical name in the template. The DeletionPolicy attribute is at its default for all resources. What will CloudFormation do as a result of this change?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a new DynamoDB table and delete the existing table..
Why this is the answer
When a resource's logical ID in a CloudFormation template is changed, CloudFormation interprets this as a request to create a new resource and delete the old resource. Since the DeletionPolicy is at its default (which is Delete), CloudFormation will create a new DynamoDB table with the new logical ID and then delete the original DynamoDB table. It will not retain the old table because the default deletion policy is active. CloudFormation does not support renaming existing resources through logical ID changes; it treats it as a replacement operation.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed