Bringing a manually created VPC under CloudFormation management via resource import

SAP-C02 By islever Editorial Last updated

Design a deployment strategy to meet business requirements.

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

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.

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

C
100%

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

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

Reader comments & corrections

No reader corrections 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.

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