Skip to content

Commit 38d7f81

Browse files
PreAgileclaude
andcommitted
docs: add auth token guidance for LocalStack module
Starting March 23, 2026, localstack/localstack:latest requires a LOCALSTACK_AUTH_TOKEN environment variable. Add a warning admonition and usage examples for both auth token and version pinning approaches. Closes #11568 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 95c616e commit 38d7f81

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

docs/modules/localstack.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
Testcontainers module for [LocalStack](http://localstack.cloud/), 'a fully functional local AWS cloud stack', to develop and test your cloud and serverless apps without actually using the cloud.
44

5+
!!! warning "Auth Token Required for `localstack/localstack:latest`"
6+
Starting March 23, 2026, `localstack/localstack:latest` requires a
7+
`LOCALSTACK_AUTH_TOKEN` environment variable. To continue without an
8+
auth token, pin to a pre-change version such as `4.14.0`.
9+
See the [LocalStack Auth Token documentation](https://docs.localstack.cloud/getting-started/auth-token/)
10+
for details.
11+
512
## Usage example
613

714
You can start a LocalStack container instance from any Java application by using:
@@ -10,6 +17,26 @@ You can start a LocalStack container instance from any Java application by using
1017
[Container creation](../../modules/localstack/src/test/java/org/testcontainers/localstack/LocalStackContainerTest.java) inside_block:container
1118
<!--/codeinclude-->
1219

20+
### Using an Auth Token
21+
22+
For LocalStack versions that require authentication, set your auth token:
23+
24+
```java
25+
LocalStackContainer localstack = new LocalStackContainer(
26+
DockerImageName.parse("localstack/localstack:latest")
27+
).withEnv("LOCALSTACK_AUTH_TOKEN", System.getenv("LOCALSTACK_AUTH_TOKEN"));
28+
```
29+
30+
### Pinning to a Pre-Change Version
31+
32+
To continue without an auth token, pin to a pre-change version such as `4.14.0`:
33+
34+
```java
35+
LocalStackContainer localstack = new LocalStackContainer(
36+
DockerImageName.parse("localstack/localstack:4.14.0")
37+
);
38+
```
39+
1340
## Creating a client using AWS SDK
1441

1542
<!--codeinclude-->

0 commit comments

Comments
 (0)