lono import


lono import SOURCE


Imports CloudFormation template and lono-fies it.


lono import /path/to/file --name my-stack
lono import http://url.com/path/to/template.json --name my-stack
lono import http://url.com/path/to/template.yml --name my-stack

Example Output

$ lono import https://s3-us-west-2.amazonaws.com/cloudformation-templates-us-west-2/EC2InstanceWithSecurityGroupSample.template --name ec2
=> Imported CloudFormation template and lono-fied it.
Template definition added to app/definitions/base.rb
Params file created to config/params/base/ec2.txt
Template downloaded to app/templates/ec2.yml
=> CloudFormation Template Summary:
  KeyName (AWS::EC2::KeyPair::KeyName)
  InstanceType (String) Default: t2.small
  SSHLocation (String) Default:
  1 AWS::EC2::Instance
  1 AWS::EC2::SecurityGroup
  2 Total
Here are contents of the params config/params/base/ec2.txt file:
#InstanceType=        # optional

Template name: CamelCase or dasherize

If you do not specify the --name option, lono import sets a name based on the filename of the imported file. It converts the name to a dasherize version of the filename by default.

You can specify whether or not to CamelCase or dasherize the name of the final template file with the --casing option. Examples:


lono import https://s3.amazonaws.com/cloudformation-templates-us-east-1/EC2InstanceWithSecurityGroupSample.template --casing dasherize


lono import https://s3.amazonaws.com/cloudformation-templates-us-east-1/EC2InstanceWithSecurityGroupSample.template --casing camelcase

The default is dasherize.

Question: You might be wondering, why does lono import uses dasherize vs underscore?

Answer: I prefer filenames to be underscored. However, CloudFormation stack names do not allow underscores in their naming, so it is encourage to either dasherize or camelize your template names so the stack name and the template name can be the same.

This blog post Introducing the lono import Command also covers lono import.


[--name=NAME]                # final name of downloaded template without extension
[--casing=CASING]            # camelcase or dasherize the template name
                             # Default: dasherize
[--summary], [--no-summary]  # provide template summary after import
                             # Default: true

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!