Hint: Export must be an object with Name key, not a string [OK]
Common Mistakes:
Using ExportName instead of Export with Name
Setting Export as a string instead of object
Incorrect Value reference syntax
3. Given two stacks, StackA exports an output named VpcId. StackB imports it using Fn::ImportValue. What will happen if StackA's export name changes but StackB is not updated?
medium
A. StackB will ignore the import and deploy without errors
B. StackB will automatically update to the new export name
C. StackB will use the old value cached locally
D. StackB deployment will fail because the import value no longer exists
Solution
Step 1: Understand ImportValue dependency
StackB depends on StackA's export name to import the value correctly.
Step 2: Effect of changing export name
If StackA changes the export name, StackB's import reference breaks and causes deployment failure.
Final Answer:
StackB deployment will fail because the import value no longer exists -> Option D
5. You want to share a VPC ID from StackA to StackB using outputs and imports. StackA exports the VPC ID as VpcIdExport. StackB imports it with Fn::ImportValue: VpcIdExport. Later, you need to update StackA to create a new VPC and export its ID with the same name. What is the best practice to avoid deployment failures in StackB?
hard
A. Change the export name in StackA and update StackB to import the new name
B. Delete StackB before updating StackA, then redeploy StackB after update
C. Keep the export name the same and update StackB without changes
D. Remove the export from StackA and hardcode the VPC ID in StackB
Solution
Step 1: Recognize export name immutability
Export names cannot be changed or deleted without affecting dependent stacks.
Step 2: Plan safe update
To update the VPC and export a new ID, use a new export name and update StackB to import that new name.
Step 3: Avoid breaking dependencies
This avoids deployment failures and keeps stacks consistent.
Final Answer:
Change the export name in StackA and update StackB to import the new name -> Option A
Quick Check:
Update export name and import to avoid conflicts = B [OK]
Hint: Change export name and update imports to avoid breaking stacks [OK]
Common Mistakes:
Deleting dependent stacks before update
Keeping export name same causing conflicts
Hardcoding values instead of using imports
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.