This is a manual and repetitive process which is subject to plenty of human errors along the way. I would forget step 2 and not run lono generate on accident. I would only realize my silly mistake after the stack errors and rolls back. For step 3, constructing the parameters file with CloudFormation’s verbose JSON array format is painstaking. For step 4, building up the long aws cloudformation create-stack command eats more precious time. This annoying manual process is a frustrating developer experience.

Lono also has param generation and CloudFormation lifecycle commands to remove this frustrating experience 😊 The official documentation for lono is at http://lono.cloud. I will give an introduction these lono commands in this post.

Review lono generate

First, you should read through the Generating Hundreds of CloudFormation Templates with Lono post to understand how lono generates CloudFormation templates. The generation phase is the first phase that lono automates. That post covers in detail how lono generates templates. For your convenience here is the diagram that shows the entire process including the generation process:

Introducing lono param

Next, the lono param subcommand is a tool that generates parameter files for the aws cloudformation CLI commands. It does this by reading an env file that simply has key=value pairs format. Using this simple format reduces JSON syntax errors.

By using lono cfn you will never launch a CloudFormation stack with a stale generated template since lono cfn automatically calls lono generate. It also automatically builds the parameters files. More details about the tool can be found on the official documentation site: http://lono.cloud.

Summary

Lono is designed to simplify the workflow required to managed CloudFormation templates. With it creating CloudFormation stacks are much easier. Lono templates and parameter env-like files are extremely simple. The command lono cfn on top of this simplifies everything down to a single command. This eliminates manual and human error. I hope you enjoy this post and found find lono helpful!

Thanks for reading this far. If you found this article useful, I'd really appreciate it if you share this article so others can find it too! Thanks 😁 Also connect with me on LinkedIn.