AWS Certified Developer Associate DVA-C01 – Question258

A Developer is preparing a deployment package using AWS CloudFormation. The package consists of two separate templates: one for the infrastructure and one for the application. The application has to be inside the VPC that is created from the infrastructure template.
How can the application stack refer to the VPC created from the infrastructure template?

A.
Use the Ref function to import the VPC into the application stack from the infrastructure template.
B. Use the export flag in the infrastructure template, and then use the Fn::ImportValue function in the application template.
C. Use the DependsOn attribute to specify that the application instance depends on the VPC in the application template.
D. Use the Fn::GetAtt function to include the attribute of the VPC in the application template.

Correct Answer: A