Bird
0
0

A CloudFormation stack tries to import a value using !ImportValue NonExistentExport but fails. What is the most likely cause?

medium📝 Debug Q6 of 15
AWS - CloudFormation
A CloudFormation stack tries to import a value using !ImportValue NonExistentExport but fails. What is the most likely cause?
AImportValue requires a parameter, not a string.
BThe export name 'NonExistentExport' does not exist in any stack.
CThe stack has no Outputs defined.
DImportValue cannot be used in Outputs section.
Step-by-Step Solution
Solution:
  1. Step 1: Understand ImportValue requirements

    ImportValue must reference an existing export name from another stack.
  2. Step 2: Identify cause of failure

    If the export name does not exist, CloudFormation throws an error during deployment.
  3. Final Answer:

    The export name 'NonExistentExport' does not exist in any stack. -> Option B
  4. Quick Check:

    ImportValue fails if export missing = D [OK]
Quick Trick: ImportValue must match an existing export name exactly [OK]
Common Mistakes:
  • Using ImportValue in Outputs incorrectly
  • Assuming stack Outputs presence affects ImportValue
  • Passing parameters instead of strings to ImportValue

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes