Better AWS Lambda handlers.
Project description
aws-lambda-handlers
Better Python 3 AWS Lambda Handlers.
Usage
pip install aws-lambda-handler
import aws_lambda class EchoHandler(aws_lambda.Handler): """Echo handler.""" def perform(self, request, **k): """Echo perform method.""" response = aws_lambda.Response() response.body = self.request.event return response echo_handler = EchoHandler() # `echo_handler` is now a callable function you can map your AWS Lambda function to
Develop
pipenv sync --dev # setup
pipenv run pytest # test
Supported Event Sources
- API Gateway
aws_lambda.apig
- S3
- DynamoDB
- SNS
- SES
- SQS
- Cognito
- Cloudwatch Logs, Events
Help
We want support for more event sources, I am willing to entertain PRs. You can use the aws_lambda.apig
submodule as an example of implementing more event sources.
Project details
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
Close
Hashes for aws_lambda_handler-0.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a04ad638702a615e0ef7ccddfe86abcd75a5c647c48d570e51342031d6b90bc5 |
|
MD5 | ec58ebaacf91032105e33279cfce2cc1 |
|
BLAKE2-256 | 6366e59e8ff7ffb7bc9191f0b0184675f9cda476fc242ed43b2ea4e2b82e2bea |