To design a modular network infrastructure using nested stacks that supports independent updates and maximum reuse, which strategy is most effective?
hard📝 Best Practice Q8 of 15
AWS - CloudFormation
To design a modular network infrastructure using nested stacks that supports independent updates and maximum reuse, which strategy is most effective?
AUse nested stacks only for compute resources and keep network resources in the parent stack
BCombine all network resources into a single large nested stack to simplify management
CCreate separate nested stacks for each network component with clearly defined input/output parameters
DAvoid using nested stacks and manage all resources in one template for consistency
Step-by-Step Solution
Solution:
Step 1: Understand modular design principles
Modularity requires separating components into distinct units with clear interfaces.
Step 2: Apply to nested stacks
Creating separate nested stacks for each network component (e.g., VPC, subnets) with defined parameters and outputs allows independent updates and reuse.
Step 3: Evaluate other options
Combining all resources reduces modularity; keeping network in parent stack limits reuse; avoiding nested stacks reduces maintainability.
Final Answer:
Create separate nested stacks for each network component with clearly defined input/output parameters -> Option C
Quick Check:
Separate nested stacks with clear interfaces enable modularity [OK]
Quick Trick:Separate nested stacks per component with clear parameters [OK]
Common Mistakes:
Merging all resources into one stack reduces modularity
Keeping network resources only in parent stack limits reuse
Avoiding nested stacks reduces maintainability
Master "CloudFormation" in AWS
9 interactive learning modes - each teaches the same concept differently