Modules

CloudFormation Modules for Reusable Resource Patterns

A module is a template fragment registered in your account's CloudFormation 24 registry under a type name ending in ::MODULE. You write the fragment (resources, parameters, outputs), register it with the CloudFormation CLI 338 (cfn init, then cfn submit, Registry and Providers), and use it like a resource type, Type: BookNest::Storage::Bucket::MODULE, with its parameters under Properties (not run here). CloudFormation expands it into the same stack: a module with logical ID Assets yields resources such as AssetsBucket, which count toward the stack's 500, and its outputs become the stack's. A nested stack, by contrast, is a separate stack with its own events and limits. Modules are versioned, up to 100 per account and region, and each account and region needs its own registration, which a StackSet can roll out with AWS 24 ::CloudFormation::ModuleVersion. LocalStack 4.13.1 63,725 cannot run them: register-type --type MODULE returns success but registers nothing, and describe-type is not supported. For reuse you can run locally, use nested stacks or CDK 24 constructs (CDK and IaC Landscape).