Skip to main content

Better AWS Lambda handlers.

Project description

CircleCI codecov


Better Python 3 AWS Lambda Handlers.

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
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

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 py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page