This guide describes how to start and use LocalStack in your CircleCI pipelines.
Setting up your CircleCI job
LocalStack is an official partner of Circle CI and can easily be integrated into your pipeline by using the official CircleCI Orb.
The Orb’s documentation features examples, as well as a description of the available commands.
When using the official CircleCI Orb, using LocalStack in your pipeline is as easy as adding the Orb to your pipeline and executing the startup command.
The following example CircleCI config (
.circleci/config.yml) starts LocalStack, creates a new S3 bucket, and prints a nice message in the end:
version: 2.1 orbs: localstack: firstname.lastname@example.org jobs: run-integration-tests: executor: localstack/default steps: - localstack/startup - run: command: awslocal s3 mb s3://test-bucket - run: command: echo "Execute your tests here :)" workflows: integration-test: jobs: - run-integration-tests
Configuring an API key
You can easily enable LocalStack Pro by adding your API key to the project’s environment variables. The LocalStack Orb will automatically pick it up and activate the Pro features.
Just go to the project settings in CircleCI, click on
Environment Variables in the sidebar and add your API key: