Lono’s behavior can be tailored using a
settings.yml file. This file should be created at
configs/settings.yml within the project. The options from the files get merged with the following precedence:
- current folder - The current folder’s
configs/settings.ymlvalues take the highest precedence.
- user - The user’s
~/.lono/settings.ymlvalues take the second highest precedence.
- default - The default settings bundled with the tool takes the lowest precedence.
Let’s take a look at an example
# The base config is specially treated. It gets included the other environments automatically. base: # extract_scripts: # to: "/opt" # as: "ec2-user" # If s3_folder is set then the generated templates and app/scripts will automatically be uploaded to s3. # There are 2 formats for s3_folder: # Format 1: # s3_folder: mybucket/path/to/folder # simple string # Format 2: # s3_folder: # Hash options in order to support multiple AWS_PROFILEs # default: mybucket/path # aws_profile1: mybucket/path # aws_profile2: another-bucket/storage/path # stack_name_suffix: random # tack on a 3 char random string at the end of the stack name for lono cfn create # s3_endpoint: https://s3.us-east-1.amazonaws.com # Allows using a bucket in a different region than the stack. Gets rid of WARNING: S3 client configured for "us-east-1" but the bucket "xxx" is in "us-west-2"; Please configure the proper region to avoid multiple unnecessary redirects and signing attempts. development: # The aws_profile tightly binds LONO_ENV to AWS_PROFILE and vice-versa. # aws_profile: dev_profile production: # The aws_profile tightly binds LONO_ENV to AWS_PROFILE and vice-versa. # aws_profile: prod_profile
The table below covers what each setting does:
|aws_profile||This provides a way to tightly bind
|stack_name_suffix||This is a convenience flag that results in lono automatically appending a string to your stack name. The string gets appended to the stack name, but gets removed internally so that lono can use its conventions. This may speed up your development flow when you are launching many stacks repeatedly. It is explained in more detail here: Stack Name Suffix. Default: false|
|s3_folder||This allows you to specify the base folder telling lono where to upload files to s3. app/scripts files are uploaded in the scripts subfolder in here and templates when using lono with nested stacks are uploaded in the templates subfolder.|
|extract_scripts||This configures how the
Pro tip: Use the <- and -> arrow keys to move back and forward.