adapter-aws-lambda
Skill by trpc
Explains how to deploy tRPC on AWS Lambda using the aws-lambda adapter from @trpc/server. It covers API Gateway v1 and v2 handlers, Lambda Function URLs, and response streaming. It is for developers who host tRPC APIs on AWS Lambda.
Install adapter-aws-lambda
Built from the published package, never by AI.
git clone --depth 1 https://github.com/trpc/trpc /tmp/trpc && mkdir -p ~/.claude/skills && cp -r /tmp/trpc/packages/server/skills/adapter-aws-lambda ~/.claude/skills/adapter-aws-lambdaRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/trpc/trpc /tmp/trpc && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/trpc/packages/server/skills/adapter-aws-lambda ~/.gemini/antigravity-cli/skills/adapter-aws-lambdaAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill gives an AI assistant guidance for deploying tRPC on AWS Lambda using the aws-lambda adapter from @trpc/server. It covers awsLambdaRequestHandler() for API Gateway v1 REST events (APIGatewayProxyEvent) and v2 HTTP events (APIGatewayProxyEventV2), along with Lambda Function URLs. It also explains CreateAWSLambdaContextOptions, which provides the event and Lambda context for creating request context.
For response streaming, it shows awsLambdaStreamingRequestHandler() wrapped in awslambda.streamifyResponse(). It notes support for Lambda Function URLs and REST APIs with responseTransferMode STREAM. It also includes a streaming async generator example, maxBatchSize limits, and common mistakes such as using httpBatchLink with per-procedure API Gateway resources. It is intended for developers who host tRPC on AWS Lambda.
Written from the project's SKILL.md and checked against it.
What it can do
- API Gateway v1 handlerCreates a tRPC handler for REST API events with awsLambdaRequestHandler().
- API Gateway v2 handlerHandles HTTP API v2 payloads using APIGatewayProxyEventV2.
- Lambda Function URLsServes tRPC through Lambda Function URLs.
- Response streamingStreams responses with awsLambdaStreamingRequestHandler() wrapped in awslambda.streamifyResponse().
- Context creationBuilds request context from the event and Lambda context with CreateAWSLambdaContextOptions.
- Streaming proceduresShows an async generator query that yields values over time.
- Batch size limitLimits batched operations per request with the maxBatchSize option.
What you need
- AWS Lambda
- @trpc/server package
- API Gateway REST or HTTP API, or Lambda Function URLs
Try asking
- Set up a tRPC handler on AWS Lambda behind API Gateway v2
- Add response streaming to my tRPC Lambda handler
- Create a Lambda context from the API Gateway event in tRPC
Good to know
- Response streaming is supported for Lambda Function URLs and REST APIs with responseTransferMode STREAM.
- Requests with more operations than maxBatchSize are rejected with 400 Bad Request.
- httpBatchLink returns 404 when API Gateway uses separate resources for each procedure.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: packages/server/skills/adapter-aws-lambda/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to adapter-aws-lambda
All alternatives →Runs the full Next.js deployment test suite for an internal vercel/next.js pull request. It validates the commit's preview package, then dispatches the test_e2e_deploy_release.yml workflow. Meant for maintainers who explicitly ask for the entire suite.
Instruments Python AI applications with DeepEval's native tracing so their execution appears span by span in Confident AI's Observatory. It is for developers building LLM apps, agents, RAG pipelines and chatbots.
Manages Azure Container Registry through the az acr Azure CLI command group. It covers registries, images, cloud builds, ACR Tasks, tokens, geo-replication and networking. Built for developers and operators who work with ACR in Azure.
Opens, runs, and shows apps on a temporary Crabbox machine, including native desktops and web previews. It is for OpenClaw users who want an app running and visible in their chat side panel.
Runs batch and HPC workloads on GKE using job queues and parallel processing. Aimed at teams running batch pipelines, HPC simulations, or ML training jobs on Google Kubernetes Engine.
Answers questions about GKE cluster and workload costs using BigQuery billing exports and live cluster metrics. Built for platform engineers and cloud teams who need to analyze and diagnose GKE spend.
Compare with deploy-release-test, deepeval-tracing or azure-container-registry-cli
adapter-aws-lambda: common questions
Which API Gateway versions does this cover?
It covers API Gateway v1 REST APIs using APIGatewayProxyEvent and v2 HTTP APIs using APIGatewayProxyEventV2. It also covers Lambda Function URLs.
How do I enable streaming on AWS Lambda with tRPC?
Wrap awsLambdaStreamingRequestHandler() in awslambda.streamifyResponse(). Without the wrapper, Lambda treats the handler as a standard buffered response.
Why does batching return 404 with API Gateway?
httpBatchLink sends several procedure names in one URL path, which does not match per-procedure resources. Use a single catch-all resource or httpLink instead.
How do I install adapter-aws-lambda?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is adapter-aws-lambda free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is adapter-aws-lambda safe to use?
It scores 89 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to adapter-aws-lambda?
Similar skills: deploy-release-test, deepeval-tracing, azure-container-registry-cli, crabbox-apps.
