Skip to main content

Class Interface for AWS Lambda event.

Project description

https://github.com/MacHu-GWU/aws_lambda_event-project/workflows/CI/badge.svg https://codecov.io/gh/MacHu-GWU/aws_lambda_event-project/branch/main/graph/badge.svg https://img.shields.io/pypi/v/aws_lambda_event.svg https://img.shields.io/pypi/l/aws_lambda_event.svg https://img.shields.io/pypi/pyversions/aws_lambda_event.svg https://img.shields.io/badge/STAR_Me_on_GitHub!--None.svg?style=social
https://img.shields.io/badge/Link-Install-blue.svg https://img.shields.io/badge/Link-GitHub-blue.svg https://img.shields.io/badge/Link-Submit_Issue-blue.svg https://img.shields.io/badge/Link-Request_Feature-blue.svg https://img.shields.io/badge/Link-Download-blue.svg

Welcome to aws_lambda_event Documentation

This library provides Python Class interface, attribute auto-complete, type hint for AWS Lambda Events.

Example:

# An example lambda handler python module
import aws_lambda_event

# example S3 Put event
def handler(event, context):
    event_obj = aws_lambda_event.S3PutEvent(event)

    for record in event_obj.records:
        # access attribute
        _ = record.eventTime

        # important attributes quick access alias
        _ = record.bucket
        _ = record.key
        _ = record.etag
        _ = record.size
        ...

List of Supported Event:

  • S3PutEvent

  • S3DeleteEvent

  • SNSTopicNotificationEvent

  • SQSEvent

  • DynamodbUpdateEvent

  • KinesisStreamEvent

  • KinesisFirehoseEvent

You can find the event JSON schema in two place:

  1. AWS Lambda Event Source Mapping Official Document: https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html

  2. Goto AWS Lambda Function Console -> Create Test Event -> Choose from Event template

Install

aws_lambda_event is released on PyPI, so all you need is:

$ pip install aws_lambda_event

To upgrade to latest version:

$ pip install --upgrade aws_lambda_event

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_event-1.0.1.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

aws_lambda_event-1.0.1-py2.py3-none-any.whl (21.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file aws_lambda_event-1.0.1.tar.gz.

File metadata

  • Download URL: aws_lambda_event-1.0.1.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

File hashes

Hashes for aws_lambda_event-1.0.1.tar.gz
Algorithm Hash digest
SHA256 bdf27af228af157e946107efbe001bcdee22500d8cee1718e5d6202c0a7207de
MD5 d00bf4258798b3206dcc62a8c393b4e7
BLAKE2b-256 ec7b48ec76be694d0d35fab19a98f1d01ffa3c7bdc446866d5007d3fbfcba7ac

See more details on using hashes here.

File details

Details for the file aws_lambda_event-1.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: aws_lambda_event-1.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 21.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

File hashes

Hashes for aws_lambda_event-1.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 79224dd77809cf415f2d70609ba06f644c873c2e89fb4bd168cfed9eee9de9ef
MD5 3d2e022e736558887a46755a0024e919
BLAKE2b-256 fc6c34a96354e1de7ccb4a1a330c65d3f82729309d4f83743f1caf9b6e61c6ce

See more details on using hashes here.

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