diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eb929ec..748a77c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - uses: gautamkrishnar/keepalive-workflow@v1 @@ -34,13 +34,13 @@ jobs: - name: Set up Python 3.10 id: setup-python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.10" - name: Start LocalStack env: - LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} + LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }} run: | pip install localstack==3.2.0 awscli-local[ver1] pip install terraform-local @@ -101,17 +101,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python 3.10 id: setup-python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.10" - name: Start LocalStack env: - LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} + LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }} DNS_ADDRESS: 0 run: | pip install localstack awscli-local[ver1] diff --git a/Makefile b/Makefile index dd06081..35a3e72 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,8 @@ run: ## Run the sample app echo $$URL start: ## Start LocalStack in detached mode - EXTRA_CORS_ALLOWED_ORIGINS=http://sample-app.s3.localhost.localstack.cloud:4566 DISABLE_CUSTOM_CORS_APIGATEWAY=1 localstack start -d + @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) + @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 stop: ## Stop the running LocalStack container @echo diff --git a/README.md b/README.md index 7149e79..4b8c5a5 100644 --- a/README.md +++ b/README.md @@ -31,12 +31,13 @@ We are using the following AWS services and their features to build our infrastr ## Prerequisites -- LocalStack Pro with the [`localstack` CLI](https://docs.localstack.cloud/getting-started/installation/#localstack-cli). +- LocalStack with the [`localstack` CLI](https://docs.localstack.cloud/getting-started/installation/#localstack-cli). - [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). - [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). - [Node.js](https://nodejs.org/en/download/) with `npm` package manager. +- 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. -Start LocalStack Pro with the appropriate configuration to enable the S3 website to send requests to the container APIs: +Start LocalStack with the appropriate configuration to enable the S3 website to send requests to the container APIs: ```shell export LOCALSTACK_AUTH_TOKEN=