Lookup Output

The lookup_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 lookup_output method to look up the value dynamically. Here’s an example:

configs/demo/params/development.txt:

VpcId=<%= lookup_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 `lookup_output`

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!