Bringing a manually created VPC under CloudFormation management via resource import

Design a deployment strategy to meet business requirements.
Answer Correct answer: C — Create a CloudFormation template that provisions the existing VPC configuration and import the existing resources into a stack for fully automated management.

A company is running its solution on AWS in a manually created VPC. The company is using AWS CloudFormation to provision other parts of the infrastructure. According to a new requirement, the company must manage all infrastructure in an automatic way. What should the company do to meet this new requirement with the LEAST effort?

  1. Create a new AWS Cloud Development Kit (AWS CDK) stack that strictly provisions the existing VPC resources and configuration. Use AWS CDK to import the VPC into the stack and to manage the VPC.
  2. Create a CloudFormation stack set that creates the VPC. Use the stack set to import the VPC into the stack.
  3. Create a new CloudFormation template that strictly provisions the existing VPC resources and configuration. From the CloudFormation console, create a new stack by importing the Existing resources. Correct Answer
  4. Create a new CloudFormation template that creates the VPC. Use the AWS Serverless Application Model (AWS SAM) CLI to import the VPC.

Community Votes

C
100%

100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

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.

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.

Community Discussion (14 comments)

saggy4 👍 10 Selected: C
D - 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
AzureDP900 👍 1
Option C provides a straightforward way to manage the existing infrastructure in an automatic way with minimal effort.
JoeTromundo 👍 2 Selected: 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.
titi_r 👍 2 Selected: C
C - correct.
titi_r 👍 2 Selected: C
C - correct.
VerRi 👍 3 Selected: C
B means to create a stack set just for VPC, we don't need a stack set to handle just 1 resource
career360guru 👍 1 Selected: B
Option B
marszalekm 👍 3 Selected: C
I discarded B, because IMO stack sets are not needed.
TheCloudGuruu 👍 1 Selected: B
Create a CloudFormation stack
arberod 👍 1 Selected: B
agree B
HunkyBunky 👍 4 Selected: C
I 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
kejam 👍 2 Selected: B
Answer B: Because CloudFormation is already in use. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-import.html
kejam 👍 1 Selected: A
Answer 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
alexis123456 👍 2
Correct Answer is B

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

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

Related Analysis

Practice All SAP-C02 Questions

Access 85 questions with complete answers and detailed explanations.

View Full SAP-C02 Practice Test →

← Back to SAP-C02 Study Guide