Skip to content

Commit 98aa46c

Browse files
authored
fix: update LocalStack license requirement and standardize CI workflow (#11)
- Add auth guard to Makefile start target - Add license bullet and update start section in README - Upgrade checkout@v3→v4, setup-node@v3→v4, Node 18→22 in CI workflow - Replace LOCALSTACK_API_KEY with LOCALSTACK_AUTH_TOKEN
1 parent 7336c70 commit 98aa46c

3 files changed

Lines changed: 15 additions & 12 deletions

File tree

.github/workflows/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,30 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2424

2525
- name: Setup Python
2626
uses: actions/setup-python@v4
2727
with:
2828
python-version: '3.9'
2929

3030
- name: Setup Nodejs
31-
uses: actions/setup-node@v3
31+
uses: actions/setup-node@v4
3232
with:
33-
node-version: 18
33+
node-version: 22
3434

3535
- name: Install dependencies
3636
run: |
3737
make install
3838
3939
- name: Start LocalStack
4040
env:
41-
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
41+
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
4242
DNS_ADDRESS: 0
4343
run: |
4444
docker pull localstack/localstack-pro:latest
4545
# Start LocalStack in the background
46-
DEBUG=1 localstack start -d
46+
DEBUG=1 LOCALSTACK_AUTH_TOKEN=$LOCALSTACK_AUTH_TOKEN localstack start -d
4747
# Wait 30 seconds for the LocalStack container to become ready before timing out
4848
echo "Waiting for LocalStack startup..."
4949
localstack wait -t 15

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ install: ## Install dependencies
1616
run: ## Deploy the app locally and run an AppSync GraphQL test invocation
1717
./run.sh
1818

19-
start:
20-
localstack start -d
19+
start: ## Start LocalStack
20+
@test -n "${LOCALSTACK_AUTH_TOKEN}" || (echo "LOCALSTACK_AUTH_TOKEN is not set. Find your token at https://app.localstack.cloud/workspace/auth-token"; exit 1)
21+
@LOCALSTACK_AUTH_TOKEN=$(LOCALSTACK_AUTH_TOKEN) localstack start -d
2122

2223
stop:
2324
@echo

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,23 @@ We are using the following AWS services and third-party integrations to build ou
2727

2828
## Prerequisites
2929

30-
- LocalStack Pro with the [`localstack` CLI](https://docs.localstack.cloud/getting-started/installation/#localstack-cli).
30+
- 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.
31+
- [`localstack` CLI](https://docs.localstack.cloud/getting-started/installation/#localstack-cli).
3132
- [AWS CLI](https://docs.localstack.cloud/user-guide/integrations/aws-cli/) with the [`awslocal` wrapper](https://docs.localstack.cloud/user-guide/integrations/aws-cli/#localstack-aws-cli-awslocal).
3233
- [Python](https://www.python.org/downloads/)
3334
- [`cURL`](https://curl.se/)
3435
- [`wscat`](https://github.com/websockets/wscat)
3536

36-
Start LocalStack Pro with the `LOCALSTACK_AUTH_TOKEN` pre-configured:
37+
## Start LocalStack
38+
39+
Start LocalStack with the `LOCALSTACK_AUTH_TOKEN` pre-configured:
3740

3841
```sh
3942
export LOCALSTACK_AUTH_TOKEN=<your-auth-token>
40-
localstack start
43+
make start
44+
make ready
4145
```
4246

43-
> If you prefer running LocalStack in detached mode, you can add the `-d` flag to the `localstack start` command, and use Docker Desktop to view the logs.
44-
4547
## Instructions
4648

4749
You can build and deploy the sample application on LocalStack by running our `Makefile` commands. Run `make install` to install the dependencies and `make run` to create the infrastructure on LocalStack. Run `make stop` to delete the infrastructure by stopping LocalStack.

0 commit comments

Comments
 (0)