Test Lambda locally

Run AWS Lambda locally with real runtimes and real event triggers. 13 Lambda runtimes, real S3/SQS/SNS/EventBridge triggers, no account required.

Want to run AWS Lambda locally? Use fakecloud.

curl -fsSL https://raw.githubusercontent.com/faiscadev/fakecloud/main/install.sh | bash
fakecloud

What you get

Quick deploy + invoke

# Node.js example
cat > index.js <<'EOF'
exports.handler = async (event) => ({ ok: true, event });
EOF
zip fn.zip index.js

aws --endpoint-url http://localhost:4566 iam create-role \
  --role-name lambda-role \
  --assume-role-policy-document '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Service":"lambda.amazonaws.com"},"Action":"sts:AssumeRole"}]}'

aws --endpoint-url http://localhost:4566 lambda create-function \
  --function-name hello \
  --runtime nodejs20.x \
  --role arn:aws:iam::000000000000:role/lambda-role \
  --handler index.handler \
  --zip-file fileb://fn.zip

aws --endpoint-url http://localhost:4566 lambda invoke \
  --function-name hello \
  --payload '{"hi":true}' \
  --cli-binary-format raw-in-base64-out \
  out.json

cat out.json

How it compares

ToolRuns function codeMulti-runtimeCross-service triggersLanguageFree
fakecloudYes (Docker)13 runtimesYes (S3, SQS, SNS, EventBridge, DynamoDB Streams, API GW v2)AnyYes
SAM LocalYes (Docker)All AWS runtimesPartial (synthetic events only)AnyYes
LocalStack Community (post-Mar 2026)Yes (Docker, auth required)AllYesAnyNo (auth token required)
serverless-offlineYes (in-process)Node onlyAPI Gateway onlyNodeYes
MotoNoN/ANoPythonYes

Full tutorial

Step-by-step guide with S3, SQS, EventBridge triggers and test-assertion examples: How to test Lambda locally.

Install