A tool for turning .pex files into Function-as-a-Service artifacts (https://github.com/pantsbuild/lambdex).

Backend: pants.backend.awslambda.python
Config section: [lambdex]

Basic options


Advanced options




default: None

If specified, install the tool using the lockfile for this named resolve.

This resolve must be defined in [python].resolves, as described in Third-party dependencies.

The resolve's entire lockfile will be installed, unless specific requirements are listed via the requirements option, in which case only those requirements will be installed. This is useful if you don't want to invalidate the tool's outputs when the resolve incurs changes to unrelated requirements.

If unspecified, and the lockfile option is unset, the tool will be installed using the default lockfile shipped with Pants.

If unspecified, and the lockfile option is set, the tool will use the custom lambdex "tool lockfile" generated from the version and extra_requirements options. But note that this mechanism is deprecated.


--lambdex-requirements="['<str>', '<str>', ...]"


default: []

If install_from_resolve is specified, install these requirements, at the versions provided by the specified resolve's lockfile.

Values can be pip-style requirements (e.g., tool or tool==1.2.3 or tool>=1.2.3), or addresses of python_requirement targets (or targets that generate or depend on python_requirement targets).

The lockfile will be validated against the requirements - if a lockfile doesn't provide the requirement (at a suitable version, if the requirement specifies version constraints) Pants will error.

If unspecified, install the entire lockfile.


--lambdex-interpreter-constraints="['<str>', '<str>', ...]"



Python interpreter constraints for this tool.




default: lambdex

The console script for the tool. Using this option is generally preferable to (and mutually exclusive with) specifying an --entry-point since console script names have a higher expectation of staying stable across releases of the tool. Usually, you will not want to change this from the default.




default: None

The entry point for the tool. Generally you only want to use this option if the tool does not offer a --console-script (which this option is mutually exclusive with). Usually, you will not want to change this from the default.

Deprecated options




one of: lambdex, zip
default: zip

Deprecated, is scheduled to be removed in version: 2.19.0.dev0.
Remove the whole [lambdex] section, as Lambdex is deprecated and its functionality will be removed. If you have `layout = "zip"`, no further action is required, as you are already using the recommended layout.

If you have layout = &quot;lambdex&quot;, removing the section will switch any python_aws_lambda_function (formerly python_awslambda) and python_google_cloud_function targets to using the zip layout, as recommended by cloud vendors. (If you are using python_aws_lambda_function, you will need to also update the handlers configured in the cloud from lambdex_handler.handler to lambda_function.handler.)

See the docs for more details:

Explicitly control the layout used for python_aws_lambda_function (formerly python_awslambda) and python_google_cloud_function targets. This option exists for the transition from Lambdex-based layout to the plain zip layout, as recommended by cloud vendors.