Skip to content

Commit 590566d

Browse files
committed
fix: update LocalStack license requirement and standardize CI workflow
- 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 16→22, upload-artifact@v3→v4 - Replace deprecated LOCALSTACK_API_KEY with LOCALSTACK_AUTH_TOKEN
1 parent 7fec1ac commit 590566d

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ 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: 16
33+
node-version: 22
3434

3535
- name: Setup SAM
3636
uses: aws-actions/setup-sam@v2
@@ -59,12 +59,12 @@ jobs:
5959
6060
- name: Start LocalStack
6161
env:
62-
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
62+
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
6363
DNS_ADDRESS: 0
6464
run: |
6565
docker pull localstack/localstack-pro:latest
6666
# Start LocalStack in the background
67-
LS_LOG=trace localstack start -d
67+
LS_LOG=trace LOCALSTACK_AUTH_TOKEN=$LOCALSTACK_AUTH_TOKEN localstack start -d
6868
# Wait 30 seconds for the LocalStack container to become ready before timing out
6969
echo "Waiting for LocalStack startup..."
7070
localstack wait -t 15
@@ -99,7 +99,7 @@ jobs:
9999
100100
- name: Upload the Diagnostic Report
101101
if: failure()
102-
uses: actions/upload-artifact@v3
102+
uses: actions/upload-artifact@v4
103103
with:
104104
name: diagnose.json.gz
105105
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) localstack start -d
2425

2526
## Stop the Running LocalStack container
2627
stop:

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,24 @@ We are using the following AWS services to build our infrastructure:
3232

3333
## Prerequisites
3434

35-
* LocalStack Pro with the [`localstack` CLI](https://docs.localstack.cloud/getting-started/installation/#localstack-cli).
35+
* 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.
36+
* [`localstack` CLI](https://docs.localstack.cloud/getting-started/installation/#localstack-cli).
3637
* [Serverless Application Model](https://docs.localstack.cloud/user-guide/integrations/aws-sam/) with the [samlocal](https://github.com/localstack/aws-sam-cli-local) installed.
3738
* [Python 3.9 installed](https://www.python.org/downloads/).
3839
* [Node.js](https://nodejs.org/en/download) with npm package manager.
3940
* [Artillery](https://artillery.io/docs/guides/overview/welcome.html) to generate some load towards both the apis.
40-
* [`yq`](https://github.com/mikefarah/yq#install) and[`jq`](https://jqlang.github.io/jq/download/) for running the deployment script.
41+
* [`yq`](https://github.com/mikefarah/yq#install) and [`jq`](https://jqlang.github.io/jq/download/) for running the deployment script.
4142

42-
Start LocalStack Pro with the `LOCALSTACK_AUTH_TOKEN` pre-configured:
43+
## Start LocalStack
44+
45+
Start LocalStack with the `LOCALSTACK_AUTH_TOKEN` pre-configured:
4346

4447
```shell
4548
export LOCALSTACK_AUTH_TOKEN=<your-auth-token>
46-
localstack start
49+
make start
50+
make ready
4751
```
4852

49-
> 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.
50-
5153
## Instructions
5254

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

0 commit comments

Comments
 (0)