Bird
0
0

Which of the following is the correct syntax to export an output named SubnetId in CloudFormation YAML?

easy📝 Syntax Q3 of 15
AWS - CloudFormation
Which of the following is the correct syntax to export an output named SubnetId in CloudFormation YAML?
AOutputs:\n SubnetId:\n ExportName: SubnetIdExport\n Value: !Ref MySubnet
BOutputs:\n SubnetId:\n Export:\n Value: !Ref MySubnet\n Name: SubnetIdExport
COutputs:\n SubnetId:\n Value: !ImportValue MySubnet\n Export:\n Name: SubnetIdExport
DOutputs:\n SubnetId:\n Value: !Ref MySubnet\n Export:\n Name: SubnetIdExport
Step-by-Step Solution
Solution:
  1. Step 1: Review correct Output export syntax

    Outputs section defines a key with Value and Export subkeys; Export has Name subkey.
  2. Step 2: Match syntax to YAML structure

    Outputs:\n SubnetId:\n Value: !Ref MySubnet\n Export:\n Name: SubnetIdExport correctly places Value and Export with Name under the output key.
  3. Final Answer:

    Outputs:\n SubnetId:\n Value: !Ref MySubnet\n Export:\n Name: SubnetIdExport -> Option D
  4. Quick Check:

    Correct export syntax = B [OK]
Quick Trick: Export uses Export: Name: under Outputs with Value [OK]
Common Mistakes:
  • Using ImportValue instead of Value in Outputs
  • Misplacing ExportName outside Export block
  • Swapping Value and Export keys

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes