nerdexam
AmazonAmazon

DVA-C02 · Question #367

DVA-C02 Question #367: Real Exam Question with Answer & Explanation

The correct answer is B: The developer's template does not use the ImportValue intrinsic function to refer to the subnets.. Cross-stack references in CloudFormation require the producing stack to export values in its Outputs section and the consuming stack to import them using Fn::ImportValue; both sides must be configured correctly.

Submitted by rohit_dlh· Mar 5, 2026Deployment

Question

A developer at a company writes an AWS CloudFormation template. The template refers to subnets that were created by a separate AWS CloudFormation template that the company's network team wrote. When the developer attempts to launch the stack for the first time, the launch fails. Which template coding mistakes could have caused this failure? (Choose two.)

Options

  • AThe developer's template does not use the Ref intrinsic function to refer to the subnets.
  • BThe developer's template does not use the ImportValue intrinsic function to refer to the subnets.
  • CThe Mappings section of the developer's template does not refer to the subnets.
  • DThe network team's template does not export the subnets in the Outputs section.
  • EThe network team's template does not export the subnets in the Mappings section.

Explanation

Cross-stack references in CloudFormation require the producing stack to export values in its Outputs section and the consuming stack to import them using Fn::ImportValue; both sides must be configured correctly.

Common mistakes.

  • A. The Ref intrinsic function resolves logical resource IDs or parameter values within the same template and cannot resolve resources or outputs defined in a separate CloudFormation stack.
  • C. The Mappings section is a static lookup table for values hardcoded within the same template; it has no mechanism to reference or retrieve values from another CloudFormation stack.
  • E. The Mappings section of the network team's template is irrelevant to cross-stack sharing; the Outputs section with an Export block is the only CloudFormation mechanism that makes values available to other stacks.

Concept tested. CloudFormation cross-stack reference with Outputs export and Fn::ImportValue

Reference. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/walkthrough-crossstackref.html

Community Discussion

No community discussion yet for this question.

Full DVA-C02 PracticeBrowse All DVA-C02 Questions