305 GitHub stars and counting — localstack/aws-cdk-local is a JavaScript project TopGit is tracking across repositories on the platform. Thin wrapper script for using the AWS CDK CLI with LocalStack
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
[!WARNING]
cdklocal is deprecated. Use lstk cdk instead.
cdklocal no longer receives updates.
Get started with lstk, the new LocalStack CLI: docs.localstack.cloud/.../lstk
Switch your scripts and CI workflows to lstk cdk: docs.localstack.cloud/.../lstk/migration
This project provides a thin wrapper script cdklocal for using the AWS CDK library against local APIs provided by LocalStack.
Note: This project replaces the old (deprecated) repo which was a fork of the AWS CDK repo. Instead of forking the repo and applying changes, we now simply provide a simple wrapper script cdklocal which applies runtime patching. The advantage of the new approach is that you should be able to use arbitrary CDK versions under the cover.
Quick Installation
The cdklocal command line is published as an npm library:
Note: Starting with version 1.65.2, the dependency aws-cdk needs to be installed manually
(to decouple the two libraries, and allow using arbitrary versions of aws-cdk under the covers).
(Note: Depending on your local setup, you may or may not have to use the global npm installation flag -g above.)
Mac OS specific MODULE_NOT_FOUND issue
On Mac OS, brew can be used to install AWS CDK, which might result in a MODULE_NOT_FOUND error from cdklocal.
To resolve this, set the NODE_PATH variable pointing to your AWS CDK's node_module folder to expand the lookup path for modules.
cdklocal supports all installed versions of the node aws-cdk package, however some complications are present for aws-cdk >= 2.177.0.
For these CDK versions, we remove AWS configuration environment variables like AWS_PROFILE from the shell environment before invoking the cdk command, and explicitly set AWS_ENDPOINT_URL and AWS_ENDPOINT_URL_S3 to target LocalStack.
We do this because other environment variables may lead to a conflicting set of configuration options, where the wrong region is used to target LocalStack, or cdklocal tries to deploy into upstream AWS by mistake. If individual configuration variables are needed for the deploy process (e.g. AWS_REGION) these configuration variables can be propagated to the cdk command by configuring AWS_ENVAR_ALLOWLIST, for example: AWS_ENVAR_ALLOWLIST=AWS_REGION,AWS_DEFAULT_REGION AWS_DEFAULT_REGION=eu-central-1 AWS_REGION=eu-central-1 cdklocal ....
If you are manually setting AWS_ENDPOINT_URL, the new value will continue to be read from the environment, however AWS_ENDPOINT_URL_S3must also be set and should include a .s3. component to ensure we correctly detect S3 requests.
Configurations
The following environment variables can be configured:
AWS_ENDPOINT_URL: The endpoint URL to connect to (combination of USE_SSL/LOCALSTACK_HOSTNAME/EDGE_PORT below)
AWS_ENDPOINT_URL_S3: The endpoint URL to connect to (combination of USE_SSL/LOCALSTACK_HOSTNAME/EDGE_PORT below) for S3 requests
AWS_ENVAR_ALLOWLIST: Allow specific AWS_* environment variables to be used by the CDK
AWS_S3_FORCE_PATH_STYLE: Force path-style S3 URLs (CDK >= 2.177.0 only). Automatically enabled when AWS_ENDPOINT_URL hostname contains .sandbox.. See Path-style S3 URLs.
EDGE_PORT (deprecated): Port under which LocalStack edge service is accessible (default: 4566)
LOCALSTACK_HOSTNAME (deprecated): Target host under which LocalStack edge service is accessible (default: localhost)
USE_SSL (deprecated): Whether to use SSL to connect to the LocalStack endpoint, i.e., connect via HTTPS.
LAMBDA_MOUNT_CODE: Whether to use local Lambda code mounting (via setting __local__ S3 bucket name). Note: may require CDK version <2.14.0 to be fully functional.
BUCKET_MARKER_LOCAL: Magic S3 bucket name for Lambda mount and hot reloading (default: __local__, will default to hot-reload in a future release)
DISABLE_DEPRECATION_NOTICE: Set to 1 to hide the deprecation notice
Path-style S3 URLs for remote endpoints
When deploying with CDK >= 2.177.0 against endpoints whose hostname contains .sandbox. (e.g. *.sandbox.localstack.cloud), asset uploads to S3 require path-style URLs. The wildcard TLS certificate for these endpoints only covers one subdomain level and cannot match virtual-hosted-style bucket addresses like <bucket>.abc.sandbox.localstack.cloud.
cdklocal automatically enables path-style S3 when it detects a .sandbox. hostname in AWS_ENDPOINT_URL. You can also opt in explicitly via AWS_S3_FORCE_PATH_STYLE=1.
Deploying a Sample App
The CDK command line ships with a sample app generator to run a quick test for getting started:
Make sure that LocalStack is installed and started:
$ localstack start
Then deploy the sample app against the local APIs via the cdklocal command line:
$ cdklocal deploy
...
Do you wish to deploy these changes (y/n)? y
...
Stack ARN:
arn:aws:cloudformation:us-east-1:000000000000:stack/TestStack/e3debc0a-311e-4968-8230-ed78f89cb614
Once the deployment is done, you can inspect the created resources via the awslocal command line:
3.1.0: Print a deprecation notice that points to lstk cdk
3.0.4: Fix asset publishing failures for CDK >= 2.177.0 against remote LocalStack endpoints (e.g. *.sandbox.localstack.cloud)
3.0.3: Add missing semver dependency
3.0.2: Add support for aws-cdk versions after 2026-03-01 (see https://github.com/aws/aws-cdk-cli/issues/310)
3.0.1: Using the -v/--version flag prints the cdklocal version and the version of the underlying aws-cdk package (if possible)
3.0.0: Sanitise environment of configuration environment variables before deployment
2.19.2: Fix SDK compatibility with aws-cdk versions >= 2.177.0
2.19.1: Fix SDK compatibility with older CDK versions; Fix patched bucket location in TemplateURL
2.19.0: Add support for aws-cdk versions >= 2.167.0
2.18.1: Throw better exception if aws-cdk not found
2.18.0: Add support for AWS_ENDPOINT_URL, USE_SSL, and BUCKET_MARKER_LOCAL configurations
2.17.0: Fix IPv4 fallback check to prevent IPv6 connection issue with localhost on macOS
2.16.0: Add check to prevent IPv6 connection issue with localhost on MacOS
2.15.0: Fix issue with undefined BUCKET_NAME_OUTPUT variable; add CI build and eslint config
2.14.0: Add switches in patches to accommodate new esbuild packaging mechanism in CDK v2.14.0+
1.65.7: Add switch that checks for asset existence before symlinking assets; fix parsing fetched template body for JSON/YAML formats; add missing dependency to "diff" package
1.65.6: Create symlinks to Lambda assets to enable persistent code mounting of Lambdas on "cdklocal synth"
1.65.5: Add support for LAMBDA_MOUNT_CODE config to enable local Lambda code mounting
1.65.4: Add support for large stacks by patching bucketUrl for ToolkitInfo
1.65.2: Patch missing getPromise() in forceCredentialRetrieval; remove aws-cdk from npm dependencies
1.65.1: Override BucketURL to use path style addressing
1.65.0: Initial release
License
The AWS CDK is distributed under the Apache License, Version 2.0.
Does localstack/aws-cdk-local have a project website?
No homepage URL was recorded for localstack/aws-cdk-local in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
Is localstack/aws-cdk-local open source?
Yes — localstack/aws-cdk-local ships under the Apache-2.0 license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/localstack/aws-cdk-local.
What is localstack/aws-cdk-local?
localstack/aws-cdk-local (localstack/aws-cdk-local) is a JavaScript project on GitHub. From the project's own README: Thin wrapper script for using the AWS CDK CLI with LocalStack
What license does localstack/aws-cdk-local use?
localstack/aws-cdk-local is released under the Apache-2.0 license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
Where do I read more about localstack/aws-cdk-local?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/localstack/aws-cdk-local is the definitive source.
Read full README in the tab above.
Is aws-cdk-local worth your time?
ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of aws-cdk-local.