Skip to content

Commit 083c9ca

Browse files
authored
#1586 Document Localstack latest image changes (#1588) (#1602)
1 parent b7aedb5 commit 083c9ca

File tree

5 files changed

+43
-6
lines changed

5 files changed

+43
-6
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Java CI with Maven
22

33
on:
44
push:
5-
branches: [ main, 2.3.x, 2.4.x, 3.0.x, 3.1.x, 3.2.x, 3.3.x, 3.4.x ]
5+
branches: [ main, 2.3.x, 2.4.x, 3.0.x, 3.1.x, 3.2.x, 3.3.x, 3.4.x, 4.0.x]
66
pull_request:
7-
branches: [ main, 2.3.x, 2.4.x, 3.0.x, 3.1.x, 3.2.x, 3.3.x, 3.4.x ]
7+
branches: [ main, 2.3.x, 2.4.x, 3.0.x, 3.1.x, 3.2.x, 3.3.x, 3.4.x, 4.0.x ]
88

99
permissions:
1010
contents: read

docs/src/main/asciidoc/testing.adoc

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ LocalStackContainer localStackContainer() {
2828
}
2929
----
3030

31+
[IMPORTANT]
32+
====
33+
Starting from March 23, 2026, the `localstack:latest` community image will require a `LOCALSTACK_AUTH_TOKEN` to run.
34+
35+
For more information about this change, pricing and how to use LocalStack going forward, see:
36+
37+
- https://blog.localstack.cloud/2026-upcoming-pricing-changes/
38+
- https://blog.localstack.cloud/localstack-single-image-next-steps/
39+
- https://blog.localstack.cloud/the-road-ahead-for-localstack/
40+
41+
====
42+
3143
To understand in depth how service connection works, follow https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#features.testing.testcontainers.service-connections[Spring Boot Reference Guide] on this topic.
3244

3345
=== Using AWS Clients with LocalStack
@@ -41,7 +53,32 @@ class LocalstackAwsClientFactoryTest {
4153
4254
@Container
4355
private LocalStackContainer localStackContainer = new LocalStackContainer(
44-
DockerImageName.parse("localstack/localstack:4.4.0"));
56+
DockerImageName.parse("localstack/localstack:latest"))
57+
.withEnv("LOCALSTACK_AUTH_TOKEN", System.getenv("LOCALSTACK_AUTH_TOKEN"));
58+
59+
@Test
60+
void aTest() {
61+
LocalstackAwsClientFactory factory = new LocalstackAwsClientFactory(localStackContainer);
62+
S3Client s3Client = factory.create(S3Client.builder());
63+
// ...
64+
}
65+
}
66+
----
67+
68+
[NOTE]
69+
====
70+
If this caught you off guard and your pipelines started to fail, or you want to try Spring Cloud AWS, you can pin LocalStack version to `4.12.0`. Note that new features, security patches and any other support will not be provided for pinned versions.
71+
====
72+
73+
74+
[source,java]
75+
----
76+
@Testcontainers
77+
class LocalstackAwsClientFactoryTest {
78+
79+
@Container
80+
private LocalStackContainer localStackContainer = new LocalStackContainer(
81+
DockerImageName.parse("localstack/localstack:4.12.0"));
4582
4683
@Test
4784
void aTest() {

spring-cloud-aws-autoconfigure/src/test/java/io/awspring/cloud/autoconfigure/metrics/CloudWatchExportAutoConfigurationIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class CloudWatchExportAutoConfigurationIntegrationTests {
5353

5454
@Container
5555
static LocalStackContainer localstack = new LocalStackContainer(
56-
DockerImageName.parse("localstack/localstack:latest"));
56+
DockerImageName.parse("localstack/localstack:4.14.0"));
5757

5858
@DynamicPropertySource
5959
static void registerProperties(DynamicPropertyRegistry registry) {

spring-cloud-aws-docker-compose/src/test/resources/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
localstack:
3-
image: localstack/localstack
3+
image: localstack/localstack:4.4.0
44
environment:
55
AWS_ACCESS_KEY_ID: noop
66
AWS_SECRET_ACCESS_KEY: noop

spring-cloud-aws-samples/spring-cloud-aws-ses-sample/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
- AWS_DEFAULT_REGION=us-east-1
1111
- SERVICES=ses
1212
- S3_MOUNT=/tmp
13-
image: localstack/localstack:latest
13+
image: localstack/localstack:4.4.0
1414
ports:
1515
- "4566:4566"
1616
volumes:

0 commit comments

Comments
 (0)