I am working in python and have a code that receives s3 event notifications via an SQS. I’m trying to find existing type support (for type hints and parsing using pydantic) for events such as s3:ObjectCreated – I would assume something must exist in libraries such as types_aiobotocore_s3, but I’m unable to locate a type that describes these events.
I don’t want to write it myself, because it should probably already exist.
Can anyone please assist?
2
Answers
Here’s a sample S3 event. This one came from the AWS Lambda ‘Test’ function:
It’s not particularly complex. Almost everything is a string.
The message sent from S3 to Lambda is not generated by Boto3, so those
aibotocore
typings would not be relevant here. I suggest trying theS3Event
type in this aws-lambda-typings library.