Initialize Deployment Tier
The init
command is used to both create a new deployment tier and update an existing one. The resources required for a new deployment tier will be created unless provided.
The --quick-start
option minimizes the setup time by disabling the core services and assuming safe defaults for all prompts. This option is useful for learning about LambdaSharp and getting started quickly. However, DO NOT use this option in production or test environments!
Options
--protect
-
(optional) Enable termination protection for the CloudFormation stack
--xray[:<LEVEL>]
-
(optional) Enable service-call tracing with AWS X-Ray for all resources in module (0=Disabled, 1=RootModule, 2=AllModules; RootModule if LEVEL is omitted)
--version <VERSION>
-
(optional) Specify version for LambdaSharp.Core module (default: same as CLI version)
--parameters <FILE>
-
(optional) Specify filename to read module parameters from (default: none)
--force-deploy
-
(optional) Force module deployment
--quick-start
-
(optional) Use safe defaults for quickly setting up a LambdaSharp deployment tier.
--core-services <VALUE>
-
(optional) Select if LambdaSharp.Core services should be enabled or not (either Enabled or Disabled, default prompts)
--existing-s3-bucket-name <NAME>
-
(optional) Existing S3 bucket name for module deployments (blank value creates new bucket)
--local <PATH>
-
(optional) Provide a path to a local check-out of the LambdaSharp modules (default: LAMBDASHARP environment variable)
--use-published
-
(optional) Force the init command to use the published LambdaSharp modules
--prompt-all
-
(optional) Prompt for all missing parameters values (default: only prompt for missing parameters with no default value)
--allow-upgrade
-
(optional) Allow upgrading LambdaSharp.Core across major releases (default: prompt)
--skip-apigateway-check
-
(optional) Skip API Gateway role check during deployment tier initialization
--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
--prompts-as-errors
-
(optional) Missing parameters cause an error instead of a prompts (use for CI/CD to avoid unattended prompts)
Examples
Creating a new deployment tier using the --quick-start
option
Using PowerShell/Bash:
lash init --tier Sandbox --quick-start
Output:
LambdaSharp CLI (v0.7.0) - Create or update a LambdaSharp deployment tier
Creating LambdaSharp tier
=> Stack creation initiated for Sandbox-LambdaSharp-Core
CREATE_COMPLETE AWS::CloudFormation::Stack Sandbox-LambdaSharp-Core
CREATE_COMPLETE AWS::S3::Bucket DeploymentBucketResource
=> Stack creation finished
=> Checking API Gateway role
Done (finished: 7/15/2019 10:20:09 AM; duration: 00:01:14.0338861)
For LambdaSharp Contributors
The init
command builds and deploys the local LambdaSharp.Core module when the LAMBDASHARP
environment variable is set. To force init
to use the published LambdaSharp Core module instead, append the --use-published
option. Alternatively, the --local
option can be used to provide the location of a local check-out of the LambdaSharpTool source tree.