Bringing a manually created VPC under CloudFormation management via resource import
Short answer
C Create a CloudFormation template that provisions the existing VPC configuration and import the existing resources into a stack for fully automated management.
Question
Key Takeaways
CloudFormation resource import lets you describe existing resources in a template and adopt them into a stack, the least-effort path to automated management of already-running infrastructure.
A manually created VPC must be managed automatically with least effort. Creating a CloudFormation template that provisions the existing VPC resources and importing the existing resources into a stack brings it under full automation without rebuilding.
Common mistake: Using a CloudFormation StackSet (Option B) — stack sets target multi-account/multi-Region deployment, not importing a single existing resource; and SAM (Option D) cannot perform resource import.
Expert Analysis
Why the Answer Is Correct
Option C writes a template that strictly mirrors the existing VPC configuration and uses CloudFormation's resource import to bring the live VPC under stack management. This achieves automated, declarative management with the least effort and no recreate.
Why the Other Options Are Wrong
Option A relies on CDK import, which requires rewriting in CDK rather than reusing the existing CloudFormation footprint. Option B uses StackSets, designed for multi-account rollout, not single-resource import. Option D uses SAM, which does not support resource import.
Community Comment Notes
saggy4 (likes 10) explains SAM cannot import and stack sets are not for importing existing resources. JoeTromundo confirms stack sets are for cross-account deployment. The vote is C (81).
Official Reference
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-import.html
This link opens the official vendor documentation in a new tab.
Community Votes
100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 13 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 13
-
saggy4 👍 10 Answered CD - SAM cannot used for importing and currently we are already using Cloudformation B - Stacksets used to create multiple stacks and currently we are using Cloudformation A - CDK , we will need to change all the entire stack from Cloudformation to CDK C - We can import existing resources in Cloudformation: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-import.html
-
HunkyBunky 👍 4 Answered CI guess C A - is out, because CDK not allow to import any exists resources B - is out, becuase StackSets are used only for create multiple stacks and manage them from a single stack D - is out, because AWS SAM cli - can't be used for import resources in CF
-
VerRi 👍 3 Answered CB means to create a stack set just for VPC, we don't need a stack set to handle just 1 resource
-
marszalekm 👍 3 Answered CI discarded B, because IMO stack sets are not needed.
-
JoeTromundo 👍 2 Answered C"Use the stack set to import the VPC into the stack." CloudFormation stack sets are designed for deploying stacks across multiple accounts and regions. They are NOT meant for importing existing resources into a single VPC or stack.
Show 8 more comments
-
kejam 👍 2 Answered BAnswer B: Because CloudFormation is already in use. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-import.html
-
kejam 👍 1 Answered AAnswer A: https://aws.amazon.com/blogs/devops/how-to-import-existing-resources-into-aws-cdk-stacks/ https://docs.aws.amazon.com/cdk/v2/guide/cli.html#cli-import
-
AzureDP900 👍 1Option C provides a straightforward way to manage the existing infrastructure in an automatic way with minimal effort.
-
alexis123456 👍 2Correct Answer is B
-
titi_r 👍 2 Answered CC - correct.
-
TheCloudGuruu 👍 1 Answered BCreate a CloudFormation stack
-
career360guru 👍 1 Answered BOption B
-
arberod 👍 1 Answered Bagree B
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SAP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full SAP-C02 Practice Test →