sam build
Build your Lambda function code
Options
Name | Description |
---|---|
--config-env <environment> | The environment name specifying the default parameter values in the configuration file to use |
--config-file <config file> | The path and file name of the configuration file containing default parameter values to use |
--debug | Turn on debug logging to print debug message generated by SAM CLI and display timestamps |
--docker-network <network name> | Specifies the name or id of an existing docker network to lambda docker containers should connect to, along with the default bridge network. If not specified, the Lambda containers will only connect to the default bridge docker network. |
--help, -h | Show help for sam |
--parameter-overrides <override string> | A string that contains AWS CloudFormation parameter overrides encoded as key=value pairs |
--profile <profile name> | Select a specific profile from your credential file to get AWS credentials |
--region <region> | Set the AWS Region of the service |
--skip-pull-image | Specify whether CLI should skip pulling down the latest Docker image for Lambda runtime |
-t, --template-file, --template <path> | AWS SAM template file |
-u, --use-container | If your functions depend on packages that have natively compiled dependencies, use this flag to build your function inside an AWS Lambda-like Docker container |
-e, --container-env-var <env var> |
|
-ef, --container-env-var-file <path> | Path to environment variable json file (e.g., env_vars.json) to pass into build containers |
-bi, --build-image <image uri> |
|
-p, --parallel | Enabled parallel builds |
-b, --build-dir <directory> | Path to a folder where the built artifacts will be stored |
-cd, --cache-dir <directory> | The folder where the cached artifacts are stored with `--cached` is specified |
-s, --base-dir <directory> | Resolve relative paths to function's source code with respect to this folder |
-m, --manifest <directory> | Path to a custom dependency manifest to use instead of the default one |
-c, --cached | Enable cached builds. Use this flag to reuse build artifacts that have not changed from previous builds |
--beta-features, --no-beta-features | Should beta features be enabled |