AWS Python Lambda Packager
Project description
Provides a quick command line utility for packaging and publishing Python AWS Lambda functions. This is a work in progress and pull requests are always welcome.
Installation
The latest release of lambda-uploader can be installed via pip:
pip install lambda-uploader
An alternative install method would be manually installing it leveraging setup.py:
git clone https://github.com/rackerlabs/lambda-uploader cd lambda-uploader python setup.py install
Configuration File
The lambda uploader expects a directory with, at a minimum, your lambda function and a lambda.json file. It is not necessary to set requirements in your config file since the lambda uploader will also check for and use a requirements.txt file.
Example lambda.json file:
{
"name": "myFunction",
"description": "It does things",
"region": "us-east-1",
"handler": "function.lambda_handler",
"role": "arn:aws:iam::00000000000:role/lambda_basic_execution",
"requirements": ["pygithub"],
"timeout": 30,
"memory": 512
}
Command Line Usage
To package and upload simply run the command from within your lambda directory or with the directory as an option.
lambda-uploader ./myfunc
To specify an alternative profile that has been defined in ~/.aws/credentials use the --profile parameter.
lambda-uploader --profile=alternative-profile
If you would prefer to upload another way you can tell the uploader to ignore the upload. This will create a package and leave it in the project directory.
lambda-uploader --no-upload ./myfunc
To publish a version without an alias you would pass the the publish flag.
lambda-uploader -p ./myfunc
If you would like to alias your upload you can pass the alias with the alias flag. The function description will be used when an alias-description is not provided.
lambda-uploader --alias myAlias --alias-description 'My alias description' ./myfunc
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
Hashes for lambda_uploader-0.3.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7058347be0fa927874447625714cb3a08ae0d0b25b2911085d74c6a99c8f05c4 |
|
MD5 | 294760f58a25fce955f3e2fcd966be71 |
|
BLAKE2b-256 | 3fb02e7b5c594b3e155b81017104c246f87636ec08208ebb92aab4e11147e1ca |