Skip to main content
  1. Projects/
  2. AWS DevOps Pro Certification/
  3. 2: Configuration Mgmt / Infrastructure as Code/
  4. 2: CloudFormation/

6: Nested Stacks / Cross-stack refs

Why nested stacks?

  • Modularity
  • Reusability
  • Reuse smaller chunks of template in (perhaps hundreds of) parent templates
  • More OOP-style

Why cross-stack refs?

  • Get diff teams working on different template files
  • Export values from one stack to another related one
  • More API-style



  • Use AWS::CloudFormation::Stack resource


  • Use cross-stack refs;
    • Use “output” section of templates
    • Use Fn::ImportValue to import outputs
Robert Boscacci
Robert Boscacci
Cinema technician who learned to code