Description
Summary
Based on the finding in aws-powertools/powertools-lambda-python#4156 it appears that when S3 sends a notification for an object deleted and triggers a Lambda function, the etag
field is optional.
In looking at our implementation vs the types in @types/aws-lambda
it seems that we have a single S3EventNotificationEventBridgeDetailSchema
schema while DefinitelyTyped has multiple kinds, one for each notification type.
I'm not sure if we should add schemas for each event type like DefinitelyTyped does or have a single one, however having multiple might help with addressing the subtle differences in field presence (i.e. etag
not present in delete notifications) & values (i.e. deletion-type
equals Permanently Deleted
).
For now I'm opening this as a feature request, but if we decide to just make etag
optional and keep the schema as-is, we can convert this as maintenance type.
Why is this needed?
So that customers can use the schema to parse their events.
Which area does this relate to?
Parser
Solution
No response
Acknowledgment
- This request meets Powertools for AWS Lambda (TypeScript) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and .NET
Future readers
Please react with 👍 and your use case to help us understand customer demand.