AWS Certified Solutions Architect – Professional — Question 770
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?
Answer options
- A. 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.
- B. Create a CloudFormation stack set that creates the VPC. Use the stack set to import the VPC into the stack.
- C. 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.
- D. Create a new CloudFormation template that creates the VPC. Use the AWS Serverless Application Model (AWS SAM) CLI to import the VPC.
Correct answer: C
Explanation
The native CloudFormation resource import feature allows users to bring existing, manually created AWS resources under CloudFormation management without having to recreate them. By writing a template that matches the exact configuration of the manually created VPC, the company can easily import the resources via the CloudFormation console with minimal effort. Other solutions involving AWS CDK, AWS SAM CLI, or StackSets add unnecessary complexity and are not the most direct method for importing existing single-stack resources.