You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to parse a S3 PUT event in an AWS Lambda where the S3 object size is 0 bytes, yields a pydantic.error_wrappers.ValidationError indicating size must be greater than 0.
Expected Behavior
Since 0 byte objects in S3 are allowed, it is expected these types of S3 events would be validated without issue when parsing the Lambda event.
Current Behavior
Receiving the following error attempting to parse a 0 byte S3 PUT event.
parse(event=event, model=models.S3Model, envelope=envelopes.SnsSqsEnvelope)
pydantic.error_wrappers.ValidationError: 1 validation error for S3Model
Records -> 0 -> s3 -> object -> size
ensure this value is greater than 0 (type=value_error.number.not_gt; limit_value=0)
Attempting to parse a S3 PUT event in an AWS Lambda where the S3 object size is 0 bytes, yields a pydantic.error_wrappers.ValidationError indicating
size
must be greater than 0.Expected Behavior
Since 0 byte objects in S3 are allowed, it is expected these types of S3 events would be validated without issue when parsing the Lambda event.
Current Behavior
Receiving the following error attempting to parse a 0 byte S3 PUT event.
Possible Solution
Change S3Object to the following:
Steps to Reproduce (for bugs)
Environment
aws-lambda-powertools==1.13.0
python 3.8
The text was updated successfully, but these errors were encountered: