DSL Basics

Here are the top-level DSL methods.

Lono DSL CloudFormation Description
Format Version AWSTemplateFormatVersion The optional AWSTemplateFormatVersion section identifies the capabilities of the template.
Condition Conditions The optional Conditions section contains statements that define the circumstances under which entities are created or configured.
Description Description The optional Description section enables you to include comments about your template. The Description must follow the AWSTemplateFormatVersion section.
Mapping Mappings The optional Mappings section matches a key to a corresponding set of named values.
Metadata Metadata The optional Mappings section matches a key to a corresponding set of named values.
Output Outputs The optional Outputs section declares output values shown in the CloudFormation outputs console.
Parameter Parameters Use the optional Parameters section to customize your templates. Parameters enable you to input custom values to your template each time you create or update a stack.
Resource Resources The required Resources section declares the AWS resources that you want to include in the stack, such as an Amazon EC2 instance or an Amazon S3 bucket.
Section General way to add a section to the generated CloudFormation template.
Transform Transform The optional Transform section specifies one or more macros that AWS CloudFormation uses to process your template.

The main methods correspond to sections of the CloudFormation anatomy sections.

The DSL provides full access to creating custom CloudFormation stacks and AWS resources. You can also wrap the DSL methods with your own Helpers. This helps you keep your code concise and more readable.