Introduced in 0.28.0
lambda builder builds AWS Lambda functions in an environment simulating AWS Lambda runtimes via lambda-builder. Apps built via this builder can run natively in Dokku and may also have their artifacts scheduled to Lambda via an appropriate scheduler.
This builder will be auto-detected in the following case:
lambda.ymlexists in the root of the app repository.
The builder may also be selected via the
lambda builder plugin supports the following AWS runtime languages on Amazon Linux 2:
- go (builder is based on AL1)
See the lambda-builder documentation for more information on how specific languages are detected.
Customizing the build environment¶
lambda builder plugin delegates all build logic to lambda-builder, including language detection and build/runtime environment specification. The lambda-builder tool supports a
lambda.yml file format for customizing how apps are built. Please see the readme for lambda-builder for more information on different options.
When deploying a monorepo, it may be desirable to specify the specific path of the
lambda.yml file to use for a given app. This can be done via the
builder-lambda:set command. If a value is specified and that file does not exist in the app's build directory, then the build will fail.
For deploys via the
git:load-image commands, the
lambda.yml is extracted from the configured
WORKDIR property of the image. For all other deploys - git push,
git:sync - will have the
lambda.yml extracted directly from the source code. Both cases will respect the configured
lambdayml-path property value.
The default value may be set by passing an empty value for the option:
lambdayml-path property can also be set globally. The global default is
lambda.yml, and the global value is used when no app-specific value is set.
The default value may be set by passing an empty value for the option.
Displaying builder-lambda reports for an app¶
You can get a report about the app's storage status using the
=====> node-js-app builder-lambda information Builder lambda computed lambdayml path: lambda2.yml Builder lambda global lambdayml path: lambda.yml Builder lambda lambdayml path: lambda2.yml =====> python-sample builder-lambda information Builder lambda computed lambdayml path: lambda.yml Builder lambda global lambdayml path: lambda.yml Builder lambda lambdayml path: =====> ruby-sample builder-lambda information Builder lambda computed lambdayml path: lambda.yml Builder lambda global lambdayml path: lambda.yml Builder lambda lambdayml path:
You can run the command for a specific app also.
You can pass flags which will output only the value of the specific information you want. For example: