Skip to content

Commit d41eeb0

Browse files
authored
Add auth token guard to Makefile and upgrade workflow actions (#11)
* Add auth token guard to Makefile and upgrade workflow actions * Fix README, restore keepalive and pinned LocalStack version in workflow
1 parent 76d7060 commit d41eeb0

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@v3
26+
uses: actions/checkout@v4
2727

2828
- uses: gautamkrishnar/keepalive-workflow@v1
2929

@@ -34,13 +34,13 @@ jobs:
3434

3535
- name: Set up Python 3.10
3636
id: setup-python
37-
uses: actions/setup-python@v2
37+
uses: actions/setup-python@v4
3838
with:
3939
python-version: "3.10"
4040

4141
- name: Start LocalStack
4242
env:
43-
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
43+
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
4444
run: |
4545
pip install localstack==3.2.0 awscli-local[ver1]
4646
pip install terraform-local
@@ -101,17 +101,17 @@ jobs:
101101
runs-on: ubuntu-latest
102102
steps:
103103
- name: Checkout
104-
uses: actions/checkout@v3
104+
uses: actions/checkout@v4
105105

106106
- name: Set up Python 3.10
107107
id: setup-python
108-
uses: actions/setup-python@v2
108+
uses: actions/setup-python@v4
109109
with:
110110
python-version: "3.10"
111111

112112
- name: Start LocalStack
113113
env:
114-
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
114+
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
115115
DNS_ADDRESS: 0
116116
run: |
117117
pip install localstack awscli-local[ver1]

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ run: ## Run the sample app
3939
echo $$URL
4040

4141
start: ## Start LocalStack in detached mode
42-
EXTRA_CORS_ALLOWED_ORIGINS=http://sample-app.s3.localhost.localstack.cloud:4566 DISABLE_CUSTOM_CORS_APIGATEWAY=1 localstack start -d
42+
@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)
43+
@LOCALSTACK_AUTH_TOKEN=$(LOCALSTACK_AUTH_TOKEN) EXTRA_CORS_ALLOWED_ORIGINS=http://sample-app.s3.localhost.localstack.cloud:4566 DISABLE_CUSTOM_CORS_APIGATEWAY=1 localstack start -d
4344

4445
stop: ## Stop the running LocalStack container
4546
@echo

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@ We are using the following AWS services and their features to build our infrastr
3131

3232
## Prerequisites
3333

34-
- LocalStack Pro with the [`localstack` CLI](https://docs.localstack.cloud/getting-started/installation/#localstack-cli).
34+
- LocalStack with the [`localstack` CLI](https://docs.localstack.cloud/getting-started/installation/#localstack-cli).
3535
- [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).
3636
- [Terraform](https://docs.localstack.cloud/user-guide/integrations/terraform/) with the [`tflocal` wrapper](https://docs.localstack.cloud/user-guide/integrations/terraform/#using-the-tflocal-script).
3737
- [Node.js](https://nodejs.org/en/download/) with `npm` package manager.
38+
- 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.
3839

39-
Start LocalStack Pro with the appropriate configuration to enable the S3 website to send requests to the container APIs:
40+
Start LocalStack with the appropriate configuration to enable the S3 website to send requests to the container APIs:
4041

4142
```shell
4243
export LOCALSTACK_AUTH_TOKEN=<your-auth-token>

0 commit comments

Comments
 (0)