Local Web Services

Test AWS applications with realistic in-process local services using native language SDKs.
Or run ldk dev as a local development server for CDK and HCL projects.
No credentials. No cost. No waiting.

pip install local-web-services-python-sdk

What is Local Web Services?

Local Web Services emulates AWS services locally for development and testing. Use the language SDKs for in-process pytest or unit testing, or run ldk dev to start a full local development server that reads your CDK or HCL project and recreates your entire stack.

Python

Python SDK

In-process AWS service testing for pytest. Start DynamoDB, SQS, S3 and more in background threads — no external process, no ports. Fluent APIs for faking, chaos, and IAM.

ldk

The local development server. Parses your CDK or HCL project and spins up local providers for every AWS service you use — DynamoDB, Lambda, S3, SQS, and more. Hot reloading included.

🔧

lws

AWS CLI for local services. Interact with your running local stack using familiar AWS SDK commands. Inspect tables, send messages, upload objects — all without touching AWS.

$0

Zero Cost

No AWS resources consumed during development. Your entire stack runs on your laptop.

Zero Credentials

No AWS access keys required. No risk of credential leaks or accidental production changes.

Δ

Zero Code Changes

Standard AWS SDK calls work transparently. Your code runs identically locally and in production.

Developer Experience

🔄

Hot Reloading

Change your Lambda handlers and see the results instantly. File watchers detect changes and reload automatically — no restart needed.

📊

Web Dashboard

Real-time web UI showing all resources, API routes, logs, and system status. Browse to http://localhost:3000/_ldk/gui to see everything at a glance.

📝

Structured Logging

All Lambda invocations, API requests, and service calls logged in real-time. Stream logs directly in your terminal or via WebSocket to the dashboard.

Why Use Local Web Services?

Building with AWS CDK or HCL traditionally means deploying to the cloud just to test your code. Every change triggers a deploy-wait-test cycle that kills your flow and racks up costs.

Without Local Web Services

  • Edit code
  • Run cdk deploy or tofu apply — wait minutes
  • Test against live AWS resources
  • Check CloudWatch logs for errors
  • Pay for every invocation and resource
  • Manage AWS credentials on every machine
  • Hope you don't break a shared environment

With Local Web Services

  • Edit code
  • Run uvx --from local-web-services ldk dev — ready in seconds
  • Edit code — hot reload picks up changes instantly
  • Test against local services
  • Use lws commands to inspect data
  • See logs directly in your terminal
  • Pay nothing
  • No credentials needed
  • Your own isolated environment

Shift Left: Inner Loop Development

Post-deployment testing is slow and expensive. Local Web Services moves testing into the inner loop — before deployment — enabling rapid iteration for developers and AI agents alike.

Instant Feedback

Edit your code and see the results immediately. Hot reloading picks up changes automatically — no restart, no redeploy, no waiting. The fastest feedback loop for cloud-native development.

AI Agent Ready

AI code editors need fast feedback loops to verify changes. Local Web Services eliminates deployment wait time, enabling AI agents to iterate and validate rapidly without AWS costs.

Production Parity

Your local environment mirrors your AWS architecture. The same services, the same APIs, the same integration patterns — so local testing actually predicts production behavior.

Zero AWS Dependency

Develop on a plane, in a coffee shop, or in a locked-down network. No AWS account needed, no credentials to manage, no risk of accidental production changes.

Complete Observability

Built-in web dashboard and structured logging show all invocations, events, and state changes. Debug with full transparency in real-time instead of hunting through CloudWatch.

CI/CD Testing

Run your full integration test suite in CI without provisioning real AWS resources. Fast, cheap, and reliable automated testing for your cloud-native apps.

How It Works

Local Web Services auto-detects your project type (CDK or HCL) and starts local AWS-compatible service endpoints. Your code talks to local services instead of real AWS.

CDK Mode

1

Parse

The ldk tool reads your cdk.out/ cloud assembly — the CloudFormation templates, construct tree, and asset paths that cdk synth produces.

2

Graph

It builds a directed graph of your resources and their relationships: which Lambda is triggered by which API route, which function writes to which table, and what depends on what.

3

Start

Local providers spin up in topological order — tables and queues first, then compute, then API gateways. Each service gets its own HTTP endpoint that speaks the AWS API.

4

Redirect

The local runtime sets AWS_ENDPOINT_URL_* environment variables so the standard AWS SDK in your Lambda handlers automatically talks to the local services. No code changes needed.

HCL Mode

1

Detect

The ldk tool detects .tf files in your project directory and enters HCL mode automatically (or use --mode terraform explicitly).

2

Start All Services

All AWS service providers start in always-on mode — DynamoDB, SQS, S3, SNS, EventBridge, Step Functions, Cognito, API Gateway, Lambda, IAM, STS, SSM Parameter Store, Secrets Manager, and more. Each service gets its own port.

3

Override

A _lws_override.tf file is generated that redirects all AWS provider endpoints to your local services. This file is automatically added to .gitignore.

4

Apply

Run tofu apply as normal. Your HCL tool creates resources (tables, queues, buckets, Lambda functions) against your local endpoints. Your Lambda handlers run locally with full AWS SDK support.

Build with Local Web Services

From in-process SDK testing to full local development servers — choose your path.