testcontainers / testcontainers/testcontainers-python

`localstack/localstack:latest` will require auth token from March 23 — LocalStack module docs & examples need updating

Open
#985 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.3k
Forks
386
Avg merge
4h 40m
Merged PRs (30d)
1

Description

Hey folks 👋

I'm Harsh from the LocalStack team. Wanted to flag an upcoming change that will directly affect users of the LocalStack module in this library.

What's changing: Starting March 23, 2026, localstack/localstack:latest on Docker Hub will consolidate into a single unified image that requires authentication via a LOCALSTACK_AUTH_TOKEN. The free Community image, as it exists today, will no longer be available under that tag without an auth token set.

What this means for this repo:

The LocalStackContainer in modules/localstack pulls localstack/localstack by default to spin up the container during tests. Any user who instantiates LocalStackContainer after March 23 without a LOCALSTACK_AUTH_TOKEN set will hit an authentication error and their tests will fail immediately.

The places most likely to need updating:

  • The LocalStack module docs and any related examples in modules/localstack, which don't currently mention auth token setup as a prerequisite
  • The LocalStackContainer class itself, where passing LOCALSTACK_AUTH_TOKEN as an environment variable should be documented or facilitated
  • The CI/CD pipeline (.github/workflows/ci-community.yml) if it runs LocalStack-based tests without an auth token

What users will need to do:

  1. Sign up for a free LocalStack account at [localstack.cloud](https://localstack.cloud/)
  2. Generate an auth token from the LocalStack Web App
  3. Set LOCALSTACK_AUTH_TOKEN as an environment variable when starting the container

With testcontainers-python, this would look like:

import os
from testcontainers.localstack import LocalStackContainer

with LocalStackContainer() \
        .with_env("LOCALSTACK_AUTH_TOKEN", os.environ.get("LOCALSTACK_AUTH_TOKEN", "")) as localstack:
    # your test code here
    pass

The good news: A free tier is staying — no one has to pay. CI credits are now unlimited on all plans, including free, and open-source projects like this one can apply for free access to paid plans.

Full details in our announcements:

Happy to help with any doc updates, review PRs, or answer questions. Let us know if there's anything we can do to make this easier — and thanks for maintaining the LocalStack module for the Python community! 🙏

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the LocalStack module docs and examples under modules/localstack, then read the LocalStackContainer class to understand its current image and environment configuration. Check .github/workflows/ci-community.yml for LocalStack-based tests. Done means the affected documentation, container setup guidance, and CI expectations address LOCALSTACK_AUTH_TOKEN requirements.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
devops, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.