Skip to main content

Better AWS Lambda handlers.

Project description

CircleCI codecov

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

aws-lambda-handler-0.0.2.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

aws_lambda_handler-0.0.2-py2.py3-none-any.whl (6.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page