Bird
0
0

A developer wrote this Output in StackA: Export: Name: MyExport. StackB imports it with !ImportValue MyExport but deployment fails. What is the error?

medium📝 Debug Q7 of 15
AWS - CloudFormation
A developer wrote this Output in StackA: Export: Name: MyExport. StackB imports it with !ImportValue MyExport but deployment fails. What is the error?
AThe Output key should be 'Export' not 'Export: Name'.
BImportValue cannot import values with 'MyExport' name.
CYAML indentation is incorrect; 'Name' must be nested under 'Export'.
DOutputs cannot be exported with the name 'MyExport'.
Step-by-Step Solution
Solution:
  1. Step 1: Check YAML syntax for Export block

    Export must be a map with Name nested properly under Export with correct indentation.
  2. Step 2: Identify indentation error

    Incorrect indentation causes CloudFormation to misinterpret the Export block, causing deployment failure.
  3. Final Answer:

    YAML indentation is incorrect; 'Name' must be nested under 'Export'. -> Option C
  4. Quick Check:

    Proper YAML indentation is critical for Export block = C [OK]
Quick Trick: Indent Export: Name: correctly under Outputs [OK]
Common Mistakes:
  • Writing Export: Name on same line
  • Misplacing Name outside Export block
  • Assuming ImportValue rejects certain names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes