This setup will get you started with LocalStack and common functionality shared between all of the IaC providers.
To set up the project you'll need to:
- Install Node and PNPM
- NVM will let you easily manage the version of Node you are currently using
- PNPM is a package manager for Node, like NPM and Yarn.
- If you prefer NPM or Yarn, you can delete the pnpm-lock.yaml files, but this could break the project!
- Install Docker
- Localstack runs as a Docker container, so we need to install Docker first. Here's a handy GUI client for managing Docker containers, images, and volumes: (Docker Desktop).
- Install Python and pip
- Localstack is installed using Python's package manager, pip. You can download Python from here. Pip is included in Python 3.4 and above. But just in case here is pip (https://pypi.org/project/pip/)
- Install LocalStack CLI
python -m pip install localstack
- Generate a LocalStack API key
- Copy
.env.example
file to a new file named.env
and replace theLOCALSTACK_API_KEY
value with the key you generated in the LocalStack web interface. - Install root project dependencies with PNPM
- Run
pnpm install
in the project root - This installs the dotenv-cli which we use to read your LocalStack API token from the .env file. This is used to ensure you download and activate LocalStack Pro.
- Run
- Start the LocalStack Pro Docker container
- Run
pnpm run start:localstack
in the project root - This convenience function reads your LocalStack API token and passes it to the LocalStack CLI command
localstack start -d
- The
-d
flag starts LocalStack detached, so you can close your terminal without stopping the Docker container.
- The
- Run
- You are now ready to configure your IaC provider, return to the project root README and select your desired IaC provider.