Keploy as a AWS Lambda testing framework
Keploy tests AWS Lambda functions by recording a real invocation and every downstream call the handler made, then replaying both as assertions. There is no SAM local container to start, no event JSON to hand-craft, and no deploy needed between changes.
keploy record -c "./bootstrap"What Keploy gives a AWS Lambda team
Any runtime, any trigger
Keploy records the handler process at the socket layer, so Node, Python, Go, Java, and custom runtimes all record the same way. API Gateway, SQS, and EventBridge triggers are just different event payloads.
- Node, Python, Go, Java, custom runtimes
- API Gateway, SQS, and EventBridge events
- Container image and zip packaging
- No handler signature change
Why AWS Lambda integration tests slow teams down
The friction is rarely the assertions. It is everything around them — spinning up dependencies, keeping mocks honest, and repairing tests after every refactor.
Testing AWS Lambda: by hand, with SAM local + mocked AWS clients, or with Keploy
SAM local emulates the runtime per invocation and still needs a stub for every AWS call. Keploy records one real invocation and replays the handler with all of them.
Select any row for the full comparison, with code.
What you write for AWS Lambda vs what Keploy records
All three produce the same assertion. Only the third still passes after the next refactor without anyone editing it.
The event is a frozen fixture and the DynamoDB response skips attribute-value marshalling, so both the trigger contract and the SDK layer go untested.
Faithful to the runtime, and every invocation is a container start — plus LocalStack and a table definition for anything the handler touches.
The event carries the real authoriser context and the DynamoDB response keeps its attribute-value encoding, so both layers a fixture skips are exercised.
Times are estimates for authoring one endpoint’s coverage from scratch, not measurements.
AWS Lambda testing tools, compared
The options a team on service and platform integrations actually reaches for, and where each one genuinely wins. Select a row for the full comparison.
Assessments reflect each tool’s documented behaviour, not benchmark measurements.
Record your AWS Lambda app once, replay it forever
Keploy sits below your AWS Lambda process at the network layer. It watches the calls your app already makes, then serves them back on replay so tests run with no dependencies attached.
Keploy records a GET call to /api/v1/orders/{id} on a AWS Lambda service and captures the dependency calls it makes.
What Keploy mocks for AWS Lambda, with zero config
6 of the 7 dependencies a typical AWS Lambda service talks to are stubbed from the recording itself — no mock classes, no fixture files, no containers in CI.
- Auto-mocked
DynamoDBView page
HTTP API via the AWS SDK
- Auto-mocked
Amazon S3View page
S3 REST API via the AWS SDK
- Auto-mocked
Amazon SQSView page
SQS HTTP API via the AWS SDK
- Auto-mocked
PostgreSQLView page
Postgres protocol to RDS or Aurora
- Auto-mocked
RedisView page
RESP to ElastiCache
- Outbound HTTPAuto-mocked
Outbound HTTP
Any third-party API the handler calls
- Partial
EventBridge
Event publishing via the AWS SDK
Your first AWS Lambda test suite in under five minutes
Every command below runs against your existing AWS Lambda service. Nothing in your source tree changes.
1Install the Keploy CLI
A single binary. It needs a Linux kernel with eBPF support, or Docker on macOS and Windows — and it adds nothing to your project's dependencies.
curl -sSL https://keploy.io/install.sh | bash2Record your service
Pass the command you already use to start the app. Keploy runs it and watches every socket it opens.
keploy record -c "./bootstrap"3Exercise the paths you care about
Invoke the function once through its real trigger. The event it received and every AWS or HTTP call it made are captured together.
curl -X POST $FUNCTION_URL/orders/ord_1/confirm -H 'Content-Type: application/json' -d '{"paymentToken":"tok_123"}'4Replay in CI
Replay serves the recorded dependency responses, so the job needs no service containers and no Docker daemon.
keploy test -c "./bootstrap" --delay 6
Ready to try it on your own AWS Lambda service?
Works with the rest of your AWS Lambda stack
Keploy records at the network layer, so framework and driver choices inside your AWS Lambda app do not change how it captures traffic.
Node.js
Handlers record with no packaging change.
Python
boto3 calls inside a handler record at the HTTP layer.
Go
A custom runtime bootstrap records like any binary.
DynamoDB
The database page covers attribute-value capture in depth.
Amazon S3
The storage page covers ETag and multipart capture.
Kubernetes
For containerised workloads, the infra page covers pod capture.
Testing the rest of your stack
- Databases
Keploy as a DynamoDB testing framework
Record real DynamoDB responses once and replay them in tests without DynamoDB Local, a table definition, or AWS credentials.
Read the guide - Cloud & Infra
Keploy as a Amazon S3 testing framework
Record real S3 uploads, downloads, and presigned URL calls once and replay them in tests without a bucket or credentials.
Read the guide - Message Queues
Keploy as a Amazon SQS testing framework
Test SQS producers and consumers against recorded messages, with no LocalStack, no queue, and no AWS credentials in CI.
Read the guide - Languages
Keploy as a Node.js testing framework
Replace nock registrations and in-memory database fixtures with tests recorded from the traffic your Node service already serves.
Read the guide - Languages
Keploy as a Python testing framework
Turn the requests your Python service already handles into a pytest-grade regression suite, with every dependency mocked from the recording.
Read the guide - Cloud & Infra
Keploy as a Kubernetes testing framework
Record traffic from a running pod and replay it as tests in CI, without a cluster, a namespace, or a service mesh.
Read the guide
Join our GlobalCommunity
Connect with developers worldwide. Follow updates, ask questions, share feedback, and ship faster with other Keploy builders.
“Best report of integration and API tests I've seen — which we don't get from RestAssured.”
G2“Future of microservices testing. I don't write tests now!”
G2 · 5/5“An amazing product that simplifies the automation.”
Gartner · 4.0