mix aws_lambda. build
(AWS Lambda Runtime v0.1.1)
View Source
Builds this project's Lambda release inside the prebuilt Elixir builder image and downloads the resulting deployment zip.
Run from your function app's directory, passing the Erlang and Elixir versions to build with:
mix aws_lambda.build 29.0.5 1.20.3What it does
- Pulls the
ghcr.io/groguelon/lambda-layer-elixir:<elixir>-erlang-<erlang>-arm64image, erroring out if no image matches the given versions. - Creates a container from that image.
- Installs
tar(and any--deppackages) in the container viadnf(the image doesn't ship withtar). - Copies this app's source into it.
- Runs
mix deps.getandmix releaseinside the container (fetching:aws_lambda_runtimeand any other declared deps). - Zips the release directory inside the container.
- Copies the zip back out to the host.
- Removes the container.
Options
--release/-r- name of the release to build. Defaults to the first release declared inmix.exs.--output/-o- where to write the zip on the host. Defaults to_build/<release>.zip.--platform- Docker platform to run for. Defaults tolinux/arm64.--dep/-d- extradnfpackage to install in the container alongsidetar(e.g. because a dep needsgitto fetch). May be given multiple times.
Summary
Functions
Entry point invoked by mix aws_lambda.build. See the moduledoc for details.
Functions
Entry point invoked by mix aws_lambda.build. See the moduledoc for details.