Paste any AWS Lambda event payload — API Gateway, SQS, S3, EventBridge, DynamoDB Streams — and get a Zod schema for your handler. Parse the event at the top of your handler and the rest of the function works against a strongly typed shape.
Lambda events arrive as JSON over the AWS Runtime API — every nested shape is technically untyped at the boundary, regardless of the @types/aws-lambda annotation on your handler signature. Generating a Zod schema from one real event payload (copy it out of CloudWatch Logs) gives you a runtime-validated event object: parse it at the top of your handler, then the rest of the function works against a strongly typed shape with no surprises if AWS adds a field or your trigger changes.
The schema captures the exact integration you use. API Gateway HTTP API v2 has version, routeKey, rawPath, requestContext.http.* — paste an event from that integration and you get a tight schema with no dead branches. Switch to SQS or S3 and you get a different schema with the same z.object/z.array primitives. Drop the parse call into a tiny middleware and any future trigger change shows up as a validation error at the edge of your code, not a runtime crash deep in business logic.