Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/modules/localstack.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

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.

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

## Usage example

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

### Using an Auth Token

For LocalStack versions that require authentication, set your auth token:

```java
LocalStackContainer localstack = new LocalStackContainer(
DockerImageName.parse("localstack/localstack:latest")
).withEnv("LOCALSTACK_AUTH_TOKEN", System.getenv("LOCALSTACK_AUTH_TOKEN"));
```

### Pinning to a Pre-Change Version

To continue without an auth token, pin to a pre-change version such as `4.14.0`:

```java
LocalStackContainer localstack = new LocalStackContainer(
DockerImageName.parse("localstack/localstack:4.14.0")
);
```

## Creating a client using AWS SDK

<!--codeinclude-->
Expand Down
Loading