AWS Certified Developer – Associate / Question #910 of 557

Question #910

A developer at a company creates an AWS CloudFormation template that references security groups created by a separate template managed by the company's security team. When deploying the stack, the deployment fails. Which issues could be responsible? (Choose two.)

A

The developer's template does not use the Ref intrinsic function to refer to the security groups.

B

The developer's template does not use the ImportValue intrinsic function to refer to the security groups.

C

The Mappings section of the developer's template does not refer to the security groups.

D

The security team's template does not export the security groups in the Outputs section.

E

The security team's template does not export the security groups in the Mappings section.

Explanation

The correct answers are B and D. When referencing resources from another CloudFormation stack, the exporting stack must export the resource in its Outputs section (D). The importing stack must then use the ImportValue intrinsic function to access the exported value (B). Using Ref (A) would only reference resources within the same template. Mappings (C, E) are static and unrelated to cross-stack references. If the security team's template does not export the security groups, or the developer's template does not use ImportValue, the deployment will fail due to unresolved dependencies.

Answer

The correct answer is: BD