CircleCI

Use LocalStack in Circle CI

This guide describes how to start and use LocalStack in your CircleCI pipelines.

The LocalStack Circle CI Orb

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:

  1. version: 2.1
  2. orbs:
  3. localstack: localstack/platform@1.0
  4. jobs:
  5. run-integration-tests:
  6. executor: localstack/default
  7. steps:
  8. - localstack/startup
  9. - run:
  10. command: awslocal s3 mb s3://test-bucket
  11. - run:
  12. command: echo "Execute your tests here :)"
  13. workflows:
  14. integration-test:
  15. jobs:
  16. - run-integration-tests

Activate LocalStack Pro

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:

Adding the LocalStack API key in CircleCI

Ran into trouble?

If you run into any issues or problems while integrating LocalStack with CircleCI, please submit an issue.

Last modified October 8, 2021: rename LocalStack in CI to ci (56e548f0)