Collection of some scripts to automate AWS Lambda deployments
Project description
AWSDeployer
Collection of some scripts to automate AWS Lambda deployments. They are useful for quick development and deployment of AWS Lambda functions and layers, as well as a REST API Gateway integration.
Just set your working directory, your awsdeployer configs and you should be good to focus on actual development.
Currently only supporting Python lambda functions.
Lambda Deployer
Easily deploy Lambda functions and their layers.
Usage
These scripts assume a working directory like that of sample:
awsdeploy.ini
file with your secrets (see sample file)awsdeploy_lambda.json
with your layer and function configurationsfunction_name.py
files, one for each of your Lambda functions
The executable is lambda
, which accepts the following commands:
$ lambda layer <layer-name>
: deploy layer "layer-name" into AWS$ lambda config [<function-name>]
: update all function configs in AWS (specify a function name to only update that function's configs); non-existing functions are created (default Lambda IAM permissions)$ lambda <function-name>
: if no option above is matched, the specified function has its code and configs updated (probably the most common case); non-existing functions are created (default Lambda IAM permissions)
Tip: all parameters can be replaced by a shorthand, which you can specify in your awsdeploy_configs.json
.
API Gateway Deployer
Easily deploy API gateway, handling input parameters and error codes, so you can focus on the code.
Usage
These scripts assume a working directory like that of sample:
awsdeploy.ini
file with your secrets (see sample file)awsdeploy_api.json
with your API definition in JSON (NOT nested!)function_xxxx.py
files, one for each of your Lambda functions associated with the endpoints
The apigateway
executable accepts two commands:
$ apigateway all
: deploy the full API (destroys already existing ones)$ apigateway <method> <path>
: deploy a single method (also destroys already existing ones)
The script also helps automating HTTP error codes, which you can find in status_codes.md
. They are automatically deployed into API Gateway and caught by it, as long as you import the awsdeployer
package, as seen in sample_apigateway/get.py
.
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 Distributions
Built Distribution
Hashes for awsdeployer-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 673762379206c694925baf7e3f16ee15f529a81a51a6bd66b9b585779104629c |
|
MD5 | 7fcca4c3c64d986a833e931b294012d4 |
|
BLAKE2b-256 | cdd55835f9be0c87f7a5d7c29596db625ef06d39aa1bc4ea7e5340bf66f37caa |