Paste any AWS Lambda event payload — API Gateway, SQS, S3, EventBridge, DynamoDB Streams — and get a Valibot v.object for your handler. Cold-start friendly: the schema only ships the primitives your shape actually uses.
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 Valibot 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.
Valibot's per-primitive tree-shaking matters for Lambda specifically: imports run on every cold invocation, so a smaller validator trims tens of milliseconds off cold-start P99. A typical event schema lands at a few hundred bytes minzipped — meaningful when your function is fronted by API Gateway and serves user-facing requests. The schema captures the exact integration you use: API Gateway HTTP API v2 has version, routeKey, rawPath, requestContext.http.* and the converter mirrors that without dead branches.