
Answer-first summary for fast verification
Answer: Create a cross-stack reference and use the Export outputfield to flag the value of VPC from the network stack. Then use Fn:lmportValue intrinsic function to import the value of VPC into the web application stack
The correct solution for referencing the VPC created in the network stack into the web application stack when using AWS CloudFormation is to create a cross-stack reference. This involves using the Export output field to flag the value of the VPC from the network stack. Once the VPC value is exported, the Fn::ImportValue intrinsic function is used to import this value into the web application stack. This approach allows for the sharing of resource values across different stacks, enabling modular and maintainable infrastructure management. AWS CloudFormation provides an organized and predictable way to create and manage AWS resources, which is particularly useful for developers and businesses looking to streamline their infrastructure provisioning processes.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A team working at a technology company uses AWS CloudFormation to manage its AWS infrastructure. They have already created a network stack that includes a Virtual Private Cloud (VPC) with subnets. Additionally, they have a web application stack that consists of EC2 instances and an RDS instance. The team aims to integrate the VPC from the network stack into the web application stack. As an AWS Certified Developer Associate, what solution would you recommend for this scenario?
A
Create a cross-stack reference and use the Outputs output field to flag the value of VPC from the network stack.Then use Fn:ilmportValue intrinsic function to import thevalue ofvPCintotheweb applicationstack
B
Create a cross-stack reference and use the Outputs output field to flag the value of vPc from the network stack. Then use Ref intrinsic function to reference the value of VPC into the web application stack
C
Create a cross-stack reference and use the Export output field to flag the value of vPC from the network stack. Then use Ref intrinsic function to reference the value of VPC into the web application stack
D
Create a cross-stack reference and use the Export outputfield to flag the value of VPC from the network stack. Then use Fn:lmportValue intrinsic function to import the value of VPC into the web application stack