Description
Expected Behavior
Trying out the S3Schema parser with an empty records array passes validation. This should not occur.
Current Behavior
Output of success
is true, while false
was expected.
Code snippet
import { S3Schema } from '@aws-lambda-powertools/parser/schemas';
const event = { Records: [] };
const parsedEvent = await S3Schema.safeParseAsync(event);
console.log(parsedEvent.success); // <-- Output: true, expected: false
Steps to Reproduce
Run code snippet above
Possible Solution
No response
Powertools for AWS Lambda (TypeScript) version
"@aws-lambda-powertools/parser": "2.13.0"
AWS Lambda function runtime
22.x
Packaging format used
npm
Execution logs
Zod version: 3.24.1
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Shipped