Run AWS CDK applications locally - accelerate development with agentic code editors
Project description
local-web-services
Run your AWS CDK applications locally. local-web-services reads your CDK project's synthesized CloudFormation templates and spins up local emulations of API Gateway, Lambda, DynamoDB, SQS, SNS, S3, and Step Functions so you can develop and test without deploying to AWS.
Try It Out
Clone the sample project — a serverless order processing system with API Gateway, Lambda, DynamoDB, SQS, S3, SNS, and Step Functions:
git clone https://github.com/local-web-services/sample-project.git
cd sample-project
npm install
npx cdk synth
Start the local environment:
uvx --from local-web-services ldk dev
Open http://localhost:3000/_ldk/gui in your browser to see the GUI — you can watch request logs, browse DynamoDB tables, inspect S3 buckets, and interact with all your resources as you run through the steps below.
In another terminal, create an order:
lws apigateway test-invoke-method \
--resource /orders \
--http-method POST \
--body '{"customerName": "Alice", "items": ["widget", "gadget"], "total": 49.99}'
Start the order processing workflow:
lws stepfunctions start-execution \
--name OrderWorkflow \
--input '{"orderId": "<ORDER_ID>", "items": ["widget", "gadget"], "total": 49.99}'
Check the workflow status:
lws stepfunctions describe-execution --execution-arn <EXECUTION_ARN>
Retrieve the order:
lws apigateway test-invoke-method \
--resource /orders/<ORDER_ID> \
--http-method GET
The sample project also includes a full end-to-end test script (test-orders.sh) that runs all of these steps automatically.
Installation
local-web-services requires Python 3.11+ and uv.
uvx --from local-web-services ldk
Or install from source:
git clone https://github.com/local-web-services/local-web-services.git
cd local-web-services
uv sync
Quick Start (Your Own Project)
- Make sure your CDK project has been synthesized:
cd your-cdk-project
npx cdk synth
- Start local-web-services:
uvx --from local-web-services ldk dev --project-dir /path/to/your-cdk-project --port 3000
ldk will discover your API routes, Lambda functions, DynamoDB tables, SQS queues, SNS topics, S3 buckets, and Step Functions state machines automatically from the CDK output.
Supported Services
Each service has two dimensions of support: CDK constructs parsed from your cdk synth output, and API operations emulated at runtime.
DynamoDB
CDK Constructs:
| Construct | Parsed Properties |
|---|---|
aws_dynamodb.Table |
tableName, partitionKey, sortKey, globalSecondaryIndexes |
API Operations:
| Operation | Supported |
|---|---|
| PutItem | Yes |
| GetItem | Yes |
| DeleteItem | Yes |
| UpdateItem | Yes |
| Query | Yes |
| Scan | Yes |
| BatchGetItem | Yes |
| BatchWriteItem | Yes |
| CreateTable | No |
| DeleteTable | No |
| DescribeTable | No |
| TransactGetItems | No |
| TransactWriteItems | No |
Backed by SQLite. Supports expression attribute names/values, filter expressions, and eventual consistency simulation.
SQS
CDK Constructs:
| Construct | Parsed Properties |
|---|---|
aws_sqs.Queue |
queueName, fifo, visibilityTimeout, contentBasedDeduplication, deadLetterQueue |
API Operations:
| Operation | Supported |
|---|---|
| SendMessage | Yes |
| ReceiveMessage | Yes |
| DeleteMessage | Yes |
| CreateQueue | Yes |
| GetQueueUrl | Yes |
| GetQueueAttributes | Yes |
| SendMessageBatch | No |
| DeleteMessageBatch | No |
| PurgeQueue | No |
| ChangeMessageVisibility | No |
Supports message attributes, long polling, and dead-letter queue wiring from RedrivePolicy.
S3
CDK Constructs:
| Construct | Parsed Properties |
|---|---|
aws_s3.Bucket |
bucketName |
API Operations:
| Operation | Supported |
|---|---|
| PutObject | Yes |
| GetObject | Yes |
| DeleteObject | Yes |
| HeadObject | Yes |
| ListObjectsV2 | Yes |
| CopyObject | No |
| DeleteObjects | No |
| CreateMultipartUpload | No |
| ListBuckets | No |
Backed by the local filesystem. Supports event notifications (ObjectCreated, ObjectRemoved), presigned URL generation, ETags, and content-type headers.
SNS
CDK Constructs:
| Construct | Parsed Properties |
|---|---|
aws_sns.Topic |
topicName |
aws_sns.Subscription is not parsed. Subscriptions are wired at runtime via the API or auto-wired by local-web-services for Lambda/SQS targets.
API Operations:
| Operation | Supported |
|---|---|
| Publish | Yes |
| Subscribe | Yes |
| CreateTopic | Yes |
| ListTopics | Yes |
| ListSubscriptions | Yes |
| Unsubscribe | No |
| DeleteTopic | No |
| SetSubscriptionAttributes | No |
Supports Lambda and SQS subscription protocols, message attributes, and fan-out to multiple subscribers.
EventBridge
CDK Constructs:
| Construct | Parsed Properties |
|---|---|
aws_events.EventBus |
eventBusName |
aws_events.Rule |
ruleName, eventBus, eventPattern, schedule, targets |
API Operations:
| Operation | Supported |
|---|---|
| PutEvents | Yes |
| PutRule | Yes |
| PutTargets | Yes |
| ListRules | Yes |
| ListEventBuses | Yes |
| RemoveTargets | No |
| DeleteRule | No |
| DescribeRule | No |
Supports event pattern matching, schedule expressions (rate and cron), Lambda targets, and input transformations.
Step Functions
CDK Constructs:
| Construct | Parsed Properties |
|---|---|
aws_stepfunctions.StateMachine |
stateMachineName, definitionBody, stateMachineType |
API Operations:
| Operation | Supported |
|---|---|
| StartExecution | Yes |
| StartSyncExecution | Yes |
| DescribeExecution | Yes |
| ListExecutions | Yes |
| ListStateMachines | Yes |
| StopExecution | No |
| GetExecutionHistory | No |
| CreateStateMachine | No |
State types: Task, Pass, Choice, Wait, Succeed, Fail, Parallel, Map. Supports JSONPath (InputPath, OutputPath, ResultPath), error handling (Retry, Catch), and Standard & Express workflows.
Cognito
CDK Constructs:
| Construct | Parsed Properties |
|---|---|
aws_cognito.UserPool |
userPoolName, lambdaTriggers (preAuthentication, postConfirmation), passwordPolicy |
aws_cognito.UserPoolClient |
userPool |
API Operations:
| Operation | Supported |
|---|---|
| SignUp | Yes |
| ConfirmSignUp | Yes |
| InitiateAuth | Yes (USER_PASSWORD_AUTH) |
| JWKS endpoint | Yes |
| AdminCreateUser | No |
| ForgotPassword | No |
| ChangePassword | No |
| GlobalSignOut | No |
Backed by SQLite. Supports JWT token generation (ID, access, refresh), user attributes, and password hashing.
Lambda
CDK Constructs:
| Construct | Parsed Properties |
|---|---|
aws_lambda.Function |
handler, runtime, code, timeout, memorySize, environment |
Runs functions locally using Python or Node.js runtimes. Supports timeout enforcement, realistic context objects, and environment variable injection. Not an AWS API endpoint — functions are invoked by other services (API Gateway, SNS, EventBridge, Step Functions).
API Gateway
CDK Constructs:
| Construct | Parsed Properties |
|---|---|
aws_apigateway.RestApi |
routes, methods, integrations |
aws_apigatewayv2.HttpApi |
routes, integrations |
HTTP API (V1 proxy integration) that routes requests to local Lambda functions. Supports path parameters, query parameters, and request/response mapping.
ECS
CDK Constructs:
| Construct | Parsed Properties |
|---|---|
aws_ecs.TaskDefinition |
containerDefinitions |
aws_ecs.FargateService / aws_ecs.Ec2Service |
taskDefinition |
aws_elasticloadbalancingv2.ApplicationListenerRule |
conditions, actions |
Runs services as local subprocesses. Supports health checking, service discovery, file watching with auto-restart, and port mapping. Supports local command overrides via ldk.local_command metadata.
Development
All development tasks are available through make:
make install # Install dependencies
make test # Run test suite
make lint # Run linter
make format # Auto-format code
make check # Run all checks (lint, format, complexity, tests)
Run make with no arguments to see all available targets.
Documentation
Visit https://github.com/local-development-kit/ldk-site for full documentation.
Contributing
See CONTRIBUTING.md for guidelines on how to contribute.
License
This project is licensed under the MIT License. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file local_web_services-0.2.2.tar.gz.
File metadata
- Download URL: local_web_services-0.2.2.tar.gz
- Upload date:
- Size: 482.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc850b51cbbb50de0ba250d9a4ca83f3dc211b0139d42b6cf5be46809912a1e7
|
|
| MD5 |
9a73184b581223882db0df27201c607d
|
|
| BLAKE2b-256 |
0abf63707cab933f51bdf97f23049e8ac6555a70478527cf8b919216b5da8e30
|
Provenance
The following attestation bundles were made for local_web_services-0.2.2.tar.gz:
Publisher:
publish.yml on local-web-services/local-web-services
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
local_web_services-0.2.2.tar.gz -
Subject digest:
dc850b51cbbb50de0ba250d9a4ca83f3dc211b0139d42b6cf5be46809912a1e7 - Sigstore transparency entry: 933816285
- Sigstore integration time:
-
Permalink:
local-web-services/local-web-services@f2f26538a26421adc4143fbb943eae883fc43222 -
Branch / Tag:
refs/tags/0.2.2 - Owner: https://github.com/local-web-services
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f2f26538a26421adc4143fbb943eae883fc43222 -
Trigger Event:
release
-
Statement type:
File details
Details for the file local_web_services-0.2.2-py3-none-any.whl.
File metadata
- Download URL: local_web_services-0.2.2-py3-none-any.whl
- Upload date:
- Size: 211.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e566e2445c0e93b211975320858cd14d2fc601ff09619fdf3f0526ff79189c8e
|
|
| MD5 |
01a4cd51979ab301b06e95ad2536954b
|
|
| BLAKE2b-256 |
a65dbd61eddb4962cd9da14de68cd702769851161f22405eeedaf3a03d831dda
|
Provenance
The following attestation bundles were made for local_web_services-0.2.2-py3-none-any.whl:
Publisher:
publish.yml on local-web-services/local-web-services
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
local_web_services-0.2.2-py3-none-any.whl -
Subject digest:
e566e2445c0e93b211975320858cd14d2fc601ff09619fdf3f0526ff79189c8e - Sigstore transparency entry: 933816295
- Sigstore integration time:
-
Permalink:
local-web-services/local-web-services@f2f26538a26421adc4143fbb943eae883fc43222 -
Branch / Tag:
refs/tags/0.2.2 - Owner: https://github.com/local-web-services
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f2f26538a26421adc4143fbb943eae883fc43222 -
Trigger Event:
release
-
Statement type: