DOP-C02 Practice Question 64: CloudFormation Resource Import
AWS Certified DevOps Engineer – Professional (DOP-C02) · Test 7 · question 4 of 10
A team manually created an S3 bucket and a DynamoDB table two years ago, and both resources now hold production data that cannot be recreated. The team wants to bring both resources under the management of a new CloudFormation stack without deleting or replacing them, so that future changes go through CloudFormation. Which approach meets this requirement?
Show answer and explanation
Answer:
CloudFormation's resource import feature lets a team bring existing resources under stack management without disruption. It requires a template describing the resources, each importable resource must have a DeletionPolicy attribute so an accidental stack deletion cannot remove the data, and the console or API import action performs the association using resource identifiers you supply. Option A describes a normal stack update, which would try to create new resources and fail or conflict because those names already exist outside CloudFormation; a plain update does not adopt unmanaged resources. Option B is destructive and unnecessary, exactly what import is designed to avoid, and it risks data loss during the restore. Option C is wrong because AWS Config conformance packs evaluate compliance rules; they have no mechanism to place a resource under CloudFormation stack management.