AWS Lambda Event to TypeScript

Paste any AWS Lambda event payload — API Gateway, SQS, S3, EventBridge, DynamoDB Streams — and get a TypeScript interface for your handler signature.

JSON input valid
TypeScript output

      
    

About this conversion

Lambda event shapes change per integration: API Gateway REST (v1) is different from HTTP API (v2), SQS batches arrays of records, S3 sends nested s3 + object descriptors, EventBridge wraps everything in detail-type / detail. The @types/aws-lambda package covers most of these but pulls in a large surface area you don't need. Generating a type from one real event payload — copied straight out of CloudWatch Logs — gives you a tight interface for that exact handler.

Paste an event your function actually received and the converter walks every nested level (requestContext, http, headers, queryStringParameters, multiValueHeaders, etc.). The resulting interface is what you put in your handler signature — and because it's generated from a real payload, fields you don't get (like multiValueHeaders on HTTP API v2) won't appear in the type, eliminating dead branches.

Same shape, other validators

Other JSON shapes