Stack
The Stack
declaration specifies the creation of a nested stack. Nested stacks inherit the same LambdaSharp configuration as their parent stack, except for the Secrets
parameter, which must be passed explicitly.
A nested stack should never be updated directly. Instead, all updates must be triggered by their parent module. Updating a nested stack directly can cause it to be in an unexpected state that will prevent the parent module from updating in the future.
Syntax
Stack: String
Description: String
Module: String
Parameters:
ModuleParameters
DependsOn:
- String
Properties
DependsOn
-
The
DependsOn
attribute identifies items that must be created prior. For additional information, see CloudFormation DependsOn Attribute.Required: No
Type: List of String
Description
-
The
Description
attribute specifies the nested stack description.Required: No
Type: String
Module
-
The
Module
attribute specifies the full name of the required module with an optional version and origin. The format must beNamespace.Name[:Version][@Origin]
. Parts in brackets ([ ]
) are optional. Without a version specifier, LambdaSharp uses the latest version it can find that is compatible with the LambdaSharp CLI. Without an origin, LambdaSharp uses the deployment bucket name of the active deployment tier as origin. Compilation fails if the LambdaSharp CLI cannot find a published module that matches the criteria.Required: Yes
Type: String
Parameters
-
The
Parameters
section specifies the parameters for the nested stack. The LambdaSharp deployment parameters, such asDeploymentBucketName
andDeploymentPrefix
, are automatically provided and don't need to be specified.Required: No
Type: Map
Stack
-
The
Stack
attribute specifies the item name. The name must start with a letter and followed only by letters or digits. Punctuation marks are not allowed. All names are case-sensitive.Required: Yes
Type: String
Examples
Creating a nested stack and accessing it outputs
- Stack: MyNestedStack
Module: Acme.MyOtherModule:1.0
Parameters:
Message: !Sub "Hi from ${Module::Name}"
- Variable: NestedOutput
Value: !GetAtt MyNestedStack.Outputs.OutputName