Skip to main content

CDK Constructs for AWS Lambda in Python

Project description

Amazon Lambda Python Library

---

cdk-constructs: Experimental

The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.


This library provides constructs for Python Lambda functions.

To use this module, you will need to have Docker installed.

Python Function

Define a PythonFunction:

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
lambda.PythonFunction(self, "MyFunction",
    entry="/path/to/my/function", # required
    index="my_index.py", # optional, defaults to 'index.py'
    handler="my_exported_func", # optional, defaults to 'handler'
    runtime=lambda.Runtime.PYTHON_3_6
)

All other properties of lambda.Function are supported, see also the AWS Lambda construct library.

Module Dependencies

If requirements.txt exists at the entry path, the construct will handle installing all required modules in a Lambda compatible Docker container according to the runtime.

.
├── lambda_function.py # exports a function named 'handler'
├── requirements.txt # has to be present at the entry path

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aws-cdk.aws-lambda-python-1.57.0.tar.gz (31.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file aws-cdk.aws-lambda-python-1.57.0.tar.gz.

File metadata

  • Download URL: aws-cdk.aws-lambda-python-1.57.0.tar.gz
  • Upload date:
  • Size: 31.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.5

File hashes

Hashes for aws-cdk.aws-lambda-python-1.57.0.tar.gz
Algorithm Hash digest
SHA256 d27b03bc136b37f5a173053f2b9197b6c92f2a6dbc10ac40b8a6acfc6855e99e
MD5 fa4d6c33e7adbd8dab8fe6ab5b2af787
BLAKE2b-256 3998565356aa63df36838576a23b663ca3ac3f6b883af913b55304e625b87fdf

See more details on using hashes here.

File details

Details for the file aws_cdk.aws_lambda_python-1.57.0-py3-none-any.whl.

File metadata

  • Download URL: aws_cdk.aws_lambda_python-1.57.0-py3-none-any.whl
  • Upload date:
  • Size: 30.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.5

File hashes

Hashes for aws_cdk.aws_lambda_python-1.57.0-py3-none-any.whl
Algorithm Hash digest
SHA256 93db7ab28b1607ca71ab3702aff3a3d7e6439da981b69b5fe53b442cea51a59e
MD5 fe07ba9ac797bec9a3690ba055340632
BLAKE2b-256 cf7aa95552f22a7b7cb277e44d90ab529ca6123e2476d9790630f0bb000267d1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page