A streamlined CLI utility for packaging and deploying Python code to AWS Lambda functions.
pip install -U git+https://github.com/harsh-br0/lambda-push- Simple deployment: Package and deploy Python files to Lambda with a single command
- Customizable file selection: Include specific files using glob patterns
- Credential management: Built-in AWS credential setup and validation with profiles
- Dry run mode: Create deployment packages without uploading to AWS
Deploy all Python files to a Lambda function:
lambda-push my-function-nameInclude specific files or patterns:
lambda-push my-function-name --include "*.py" --include "modules/**/*.py"Create the ZIP package without deploying to AWS:
lambda-push my-function-name --dryConfigure AWS credentials for deployment:
lambda-push --setup| Argument | Description |
|---|---|
function_name |
Name of the AWS Lambda function to update |
-i,--include PATTERN |
Glob pattern to include files (can be used multiple times) |
-d,--dry |
Create the ZIP file without deploying to Lambda |
-p,--profile |
Select specific AWS profile (default: lambda_push) |
--setup |
Configure AWS credentials |
# Deploy only handler.py and utils directory
lambda-push my-function --include "handler.py" --include "utils/**/*.py"# Create a ZIP file named "my-function.zip" without deploying
lambda-push my-function --dryThe tool requires properly configured AWS credentials with permissions to update Lambda functions. You can set up credentials using:
- The
--setupflag which guides you through the process - AWS CLI's
aws configurecommand (Make sure to uselambda_pushprofile) - Environment variables
- AWS credentials file
- Python 3.6+
- AWS account with appropriate permissions
- Boto3
