Stack Output

The stack_output method can be used in params files to reference outputs in other stacks.

Let’s say you have deployed a stack named vpc.

lono cfn deploy vpc

The vpc stack has been designed with a VpcId output.

Then you would like to launch another stack that has a VpcId parameter. You can use the stack_output method to look up the value dynamically. Here’s an example:

configs/demo/params/development.txt:

VpcId=<%= stack_output("vpc.VpcId") %>

The vpc stack’s VpcId output us used as the VpcId parameter for the demo stack:

lono cfn deploy demo # will use the VpcId parameter from `stack_output`

The helpers are also documented in Built-In Helpers.

Back to DSL Extras List Docs.

Pro tip: Use the <- and -> arrow keys to move back and forward.

Edit this page

See a typo or an error? You can improve this page. This website is available on GitHub and contributions are encouraged and welcomed. We love pull requests from you!