MousaZeidBaker / aws-lambda-typing

Python type hints for AWS Lambda
MIT License
106 stars 19 forks source link

Create `StreamsEventResponse` #70

Closed ryo-murai closed 2 years ago

ryo-murai commented 2 years ago

I'm writing a lambda function receiving DynamoDB stream events. It replies a StreamsEventResponse to report failed items in partial error case, so that the AWS re-delivers only the failed event items. I would appreciate if that response type is provided.

Document for the StreamsEventResponse is below: https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#streams-batchfailurereporting-syntax

At least, the following keys are required to work reporting the item failures.

{ 
  "batchItemFailures": [ 
        {
            "itemIdentifier": "<id str>"
        }
    ]
}