From d8f059c945e2c6af0988fd79f769c2888bc81214 Mon Sep 17 00:00:00 2001 From: Harsh Mishra Date: Fri, 4 Sep 2026 16:33:11 +0530 Subject: [PATCH] Migrate from the localstack CLI to lstk --- .github/workflows/ci.yml | 4 ++-- Makefile | 12 ++++-------- README.md | 5 ++--- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 087cddb..1e8bb25 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,8 +34,8 @@ jobs: - name: Install CDK run: | - npm install -g aws-cdk-local aws-cdk - cdklocal --version + npm install -g @localstack/lstk aws-cdk + cdk --version - name: Install dependencies run: | diff --git a/Makefile b/Makefile index 9273835..34d7d43 100644 --- a/Makefile +++ b/Makefile @@ -38,19 +38,15 @@ start: ## Start LocalStack stop: ## Stop LocalStack docker compose down -ready: ## Wait until LocalStack is ready - @echo Waiting on the LocalStack container... - @localstack wait -t 30 && echo LocalStack is ready to use! || (echo Gave up waiting on LocalStack, exiting. && exit 1) - logs: ## Save the logs in a separate file - @localstack logs > logs.txt + @lstk logs > logs.txt install: venv $(VENV_RUN); $(PIP_CMD) install -r requirements.txt deploy: - $(VENV_RUN); $(LOCAL_ENV) cdklocal bootstrap --output ./cdk.local.out - $(VENV_RUN); $(LOCAL_ENV) cdklocal deploy --require-approval never --output ./cdk.local.out + $(VENV_RUN); $(LOCAL_ENV) lstk cdk bootstrap --output ./cdk.local.out + $(VENV_RUN); $(LOCAL_ENV) lstk cdk deploy --require-approval never --output ./cdk.local.out deploy-aws: $(VENV_RUN); $(CLOUD_ENV) cdk bootstrap @@ -68,4 +64,4 @@ run: run-aws: $(VENV_RUN); $(CLOUD_ENV) python run.py -.PHONY: usage venv start stop ready logs install deploy deploy-aws destroy destroy-aws run run-aws +.PHONY: usage venv start stop logs install deploy deploy-aws destroy destroy-aws run run-aws diff --git a/README.md b/README.md index 8161275..201981d 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,10 @@ This scenario demonstrates how to use Database Migration Service (DMS) to create ## Pre-requisites -- A valid [LocalStack for AWS license](https://localstack.cloud/pricing). Your license provides a [`LOCALSTACK_AUTH_TOKEN`](https://docs.localstack.cloud/getting-started/auth-token/) to activate LocalStack. +- A valid [LocalStack for AWS license](https://localstack.cloud/pricing). Your license provides a [`LOCALSTACK_AUTH_TOKEN`](https://docs.localstack.cloud/aws/getting-started/auth-token/) to activate LocalStack. - [Python 3.10](https://www.python.org/downloads/) & `pip` - [Docker Compose](https://docs.docker.com/compose/install/) -- [CDK](https://docs.localstack.cloud/user-guide/integrations/aws-cdk/) with the [`cdklocal`](https://github.com/localstack/aws-cdk-local) wrapper. +- [CDK](https://docs.localstack.cloud/user-guide/integrations/aws-cdk/) with the [`lstk`](https://docs.localstack.cloud/aws/developer-tools/running-localstack/lstk/) CLI. ## Start LocalStack @@ -20,7 +20,6 @@ Start LocalStack with the `LOCALSTACK_AUTH_TOKEN` pre-configured: ```bash export LOCALSTACK_AUTH_TOKEN= make start -make ready ``` The Docker Compose file will start LocalStack container and a Postgres container. The Postgres container will be used to showcase how to reach a database external to LocalStack.