Skip to content

Commit 9917de0

Browse files
authored
fix: update LocalStack license requirement and standardize CI workflow (#7)
* fix: update LocalStack license requirement and standardize CI workflow - Add auth guard to Makefile start target - Replace LocalStack Pro with LocalStack; add license bullet; add start section in README - Upgrade checkout@v3->v4, setup-node@v3->v4, Node 18->22, upload-artifact@v3->v4 - Replace deprecated LOCALSTACK_API_KEY with LOCALSTACK_AUTH_TOKEN * Update LocalStack start command in Makefile Add EXTRA_CORS_ALLOWED_ORIGINS to LocalStack start command
1 parent f2e3ae1 commit 9917de0

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ 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 Node.js
26-
uses: actions/setup-node@v3
26+
uses: actions/setup-node@v4
2727
with:
28-
node-version: 18
28+
node-version: 22
2929

3030
- name: Install CDK
3131
run: |
@@ -38,13 +38,13 @@ jobs:
3838
3939
- name: Start LocalStack
4040
env:
41-
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
41+
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
4242
run: |
4343
pip install localstack awscli-local[ver1]
4444
pip install terraform-local
4545
docker pull localstack/localstack-pro:latest
4646
# Start LocalStack in the background
47-
EXTRA_CORS_ALLOWED_ORIGINS=* DEBUG=1 localstack start -d
47+
EXTRA_CORS_ALLOWED_ORIGINS=* DEBUG=1 LOCALSTACK_AUTH_TOKEN=$LOCALSTACK_AUTH_TOKEN localstack start -d
4848
# Wait 30 seconds for the LocalStack container to become ready before timing out
4949
echo "Waiting for LocalStack startup..."
5050
localstack wait -t 15
@@ -104,7 +104,7 @@ jobs:
104104
105105
- name: Upload the Diagnostic Report
106106
if: failure()
107-
uses: actions/upload-artifact@v3
107+
uses: actions/upload-artifact@v4
108108
with:
109109
name: diagnose.json.gz
110110
path: ./diagnose.json.gz

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ deploy:
2020

2121
## Start LocalStack in detached mode
2222
start:
23-
localstack start -d
23+
@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)
24+
@LOCALSTACK_AUTH_TOKEN=$(LOCALSTACK_AUTH_TOKEN) EXTRA_CORS_ALLOWED_ORIGINS=* localstack start -d
2425

2526
## Stop the Running LocalStack container
2627
stop:

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,20 @@ We are using the following AWS services and their features to build our infrastr
2626

2727
## Prerequisites
2828

29-
- LocalStack Pro
29+
- 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.
30+
- [`localstack` CLI](https://docs.localstack.cloud/getting-started/installation/#localstack-cli).
3031
- [AWS CLI](https://docs.localstack.cloud/user-guide/integrations/aws-cli/) with the [`awslocal`](https://github.com/localstack/awscli-local) wrapper.
3132
- [CDK](https://docs.localstack.cloud/user-guide/integrations/aws-cdk/) with the [`cdklocal`](https://github.com/localstack/aws-cdk-local) wrapper.
32-
- [NodeJS v18.0.0](https://nodejs.org/en/download/) with `npm` package manager.
33+
- [Node.js](https://nodejs.org/en/download/) with `npm` package manager.
3334

34-
Start LocalStack Pro by setting your `LOCALSTACK_AUTH_TOKEN` to activate the Pro features.
35+
## Start LocalStack
36+
37+
Start LocalStack with the `LOCALSTACK_AUTH_TOKEN` pre-configured:
3538

3639
```shell
37-
export LOCALSTACK_AUTH_TOKEN=<your-api-key>
38-
EXTRA_CORS_ALLOWED_ORIGINS=* localstack start -d
40+
export LOCALSTACK_AUTH_TOKEN=<your-auth-token>
41+
make start
42+
make ready
3943
```
4044

4145
## Instructions

0 commit comments

Comments
 (0)