Simplify your lambda workflow
Project description
simple-lambda
simple-lambda is a script that wraps around uv to publish simple scripts to AWS Lambda.
The core idea surrounds PEP-723 inline metadata scripts which uv has great support for.
Prerequisites
Installation
Optional installation as a tool.
uv tool install simple-lambda
Use uvx simple-lambda if you don't want to install it as a tool.
Usage
Deploying a package
Usage: simple-lambda deploy [OPTIONS] FUNCTION_NAME FILE_PATH
╭─ Arguments ─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ * function_name TEXT [required] │
│ * file_path FILE Path to the main Python file containing the Lambda function handler. [required] │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --help Show this message and exit. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Define the lambda function first via the UI or using something like terraform.
Create a script locally:
touch my_code.py
Add dependencies using UV:
uv add --script my_code.py requests
Optionally lock dependencies using UV:
uv lock --script my_code.py
Once you finish adding your code to the file. You can now deploy it:
uvx simple-lambda deploy lambda_function_name my_code.py
simple-lambda will automatically handle the dependencies based on the architecture and the runtime defined for the lambda function.
Build package only
If you only want to build the zip file, you can use the build command. You will however need to specify the architecture and python version.
Usage: simple-lambda build [OPTIONS] FILE_PATH
╭─ Arguments ─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ * file_path FILE Path to the main Python file containing the Lambda function handler. [required] │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ * --architecture [x86_64|arm64] The target architecture of the lambda. [required] │
│ --output FILE Path to the output .zip file. [default: deployment_package.zip] │
│ --python-version TEXT The Python version for the Lambda deployment package. [default: 3.13] │
│ --help Show this message and exit. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simple_lambda-0.1.0.tar.gz.
File metadata
- Download URL: simple_lambda-0.1.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
658e18bc8600be3db317c89773ee2db032fc695ada5345c45168ae41a86ef251
|
|
| MD5 |
2ce5aa5b84502f59acc83cc5f6bf07f6
|
|
| BLAKE2b-256 |
34b631aa8292c67698ce145863783c31c9662fc91bab221356c2e69e57bba8ab
|
Provenance
The following attestation bundles were made for simple_lambda-0.1.0.tar.gz:
Publisher:
python-publish.yml on Jamie-Chang/simple-lambda
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simple_lambda-0.1.0.tar.gz -
Subject digest:
658e18bc8600be3db317c89773ee2db032fc695ada5345c45168ae41a86ef251 - Sigstore transparency entry: 453476498
- Sigstore integration time:
-
Permalink:
Jamie-Chang/simple-lambda@b3dee084d5779b83dfcf23db5166e7cc19f07dfe -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Jamie-Chang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b3dee084d5779b83dfcf23db5166e7cc19f07dfe -
Trigger Event:
release
-
Statement type:
File details
Details for the file simple_lambda-0.1.0-py3-none-any.whl.
File metadata
- Download URL: simple_lambda-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52065c5e57b95d34f9c330827f0d8cb90643d513434cb6884caa94a274360013
|
|
| MD5 |
ceec9ca75bf9effacb77ca8bfcdd1ced
|
|
| BLAKE2b-256 |
a6e6788fcbf75c78bd0ba7ae11ecd83a535a37ee15a8f42b699a15e5c49bde49
|
Provenance
The following attestation bundles were made for simple_lambda-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on Jamie-Chang/simple-lambda
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simple_lambda-0.1.0-py3-none-any.whl -
Subject digest:
52065c5e57b95d34f9c330827f0d8cb90643d513434cb6884caa94a274360013 - Sigstore transparency entry: 453476499
- Sigstore integration time:
-
Permalink:
Jamie-Chang/simple-lambda@b3dee084d5779b83dfcf23db5166e7cc19f07dfe -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Jamie-Chang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@b3dee084d5779b83dfcf23db5166e7cc19f07dfe -
Trigger Event:
release
-
Statement type: