Show / Hide Table of Contents

Build Module

The build command compiles the module in preparation for publishing. If the module contains functions, the dependencies are resolved, the function project is built, and a Lambda-ready package is created. If the module contains file packages, the files are compressed into a zip archive.

Arguments

The build command takes an optional path. The path can either refer to a module definition or a folder containing a Module.yml file.

lash build

Options

--no-assembly-validation

(optional) Disable validating LambdaSharp assemblies

--no-dependency-validation

(optional) Disable validating LambdaSharp module dependencies

--configuration|-c <CONFIGURATION>

(optional) Build configuration for function projects (default: "Release")

--git-sha <VALUE>

(optional) Git SHA of most recent git commit (default: invoke git rev-parse HEAD command)

--git-branch <VALUE>

(optional) (optional) Git branch name (default: invoke git rev-parse --abbrev-ref HEAD command)

--output|-o <DIRECTORY>

(optional) Path to output directory (default: bin)

--selector <NAME>

(optional) Selector for resolving conditional compilation choices in module

--cfn-output <FILE>

(optional) Name of generated CloudFormation template file (default: bin/cloudformation.json)

--module-version <VERSION>

(optional) Override the module version

--module-build-date <DATE>

(optional) Override module build date [yyyyMMddHHmmss]

--force-build

(optional) Always build function packages

--force-refresh

(optional) Always refresh manifests from their origin

--build-policy <FILEPATH>

(optional) Provide build policy document file path

--dryrun[:<LEVEL>]

(optional) Generate output artifacts without deploying (0=everything, 1=cloudformation)

--tier|-T <NAME>

(optional) Name of deployment tier (default: LAMBDASHARP_TIER environment variable)

--aws-profile|-P <NAME>

(optional) Use a specific AWS profile from the AWS credentials file

--aws-region <NAME>

(optional) Use a specific AWS region (default: read from AWS profile)

--verbose|-V[:<LEVEL>]

(optional) Show verbose output (0=Quiet, 1=Normal, 2=Detailed, 3=Exceptions; Normal if LEVEL is omitted)

--no-ansi

(optional) Disable colored ANSI terminal output

--quiet

(optional) Don't show banner or execution time

--no-beep

(optional) Don't emit beep when finished

Examples

Build module in current folder

Using PowerShell/Bash:

lash build

Output:

LambdaSharp CLI (v0.5) - Build LambdaSharp module

Reading module: Module.yml
Compiling: Demo.SlackTodo (v1.0-DEV)
=> Building function RecordMessage [netcoreapp3.1, Release]
=> Building function SlackCommand [netcoreapp3.1, Release]
=> Module compilation done: C:\LambdaSharpTool\Demos\Demo\bin\cloudformation.json

Done (finished: 1/17/2019 3:57:27 PM; duration: 00:00:21.2642565)

Build module in a sub-folder

Using PowerShell/Bash:

lash build Demo

Output:

LambdaSharp CLI (v0.5) - Build LambdaSharp module

Reading module: Module.yml
Compiling: Demo.SlackTodo (v1.0-DEV)
=> Building function RecordMessage [netcoreapp3.1, Release]
=> Building function SlackCommand [netcoreapp3.1, Release]
=> Module compilation done: C:\LambdaSharpTool\Demos\Demo\bin\cloudformation.json

Done (finished: 1/17/2019 3:57:27 PM; duration: 00:00:21.2642565)
In This Article
Back to top Generated by DocFX