Built-in Helpers

Here are some of the built-in helpers available in the Lono DSL:

Method Description
content Returns the script from the app/content folder as a String. Meant for any general content.
default_subnets Returns Array of default Subnet Ids. Useful for config params.
default_vpc Returns default VPC id. Useful for config params.
extract_scripts Generates a script that can be included in user_data scripts to extract app/script files. More info about the helper is in the App Scripts docs.
key_pairs Returns Array of Key Pairs. You can pass it a pattern to filter for keypairs. IE: key_pairs(/default/).first. Useful for config params.
stack_output Returns the Stack output. IE: stack_output("my-stack.OutputKey"). Useful for params files.
stack_resource Returns the Stack resource physical id. IE: stack_resource("my-stack.LogicalId"). Useful for params files.
tags Converts a standard Ruby hash to the CloudFormation key, value structure.
user_data Returns the script from the app/user_data folder as a String. Meant for user_data scripts.
user_data_script Path location of the script to be used along with the user_data_script helper.

The built-in helpers are defined in this this source code file: dsl/builder/helpers/core_helper.rb.

You can also create your own helpers with Custom Helpers.

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!