Every Spring Boot developer who works with AWS knows the pain. You write code that talks to S3, SQS, or DynamoDB. To test it, you either mock everything (and discover at deploy time that your mocks were wrong), or you point your tests at a real AWS account (and pray nobody deletes the wrong bucket).
LocalStack used to be the answer. Then in March 2026, LocalStack ended its free Community edition. According to ):
# application-test.yml
spring:
cloud:
aws:
endpoint: http://localhost:4566
region:
static: us-east-1
credentials:
access-key: test
secret-key: test
For per-service overrides, you can also use spring.cloud.aws.s3.endpoint, spring.cloud.aws.sqs.endpoint, or spring.cloud.aws.dynamodb.endpoint.
Option 2: Testcontainers (Recommended for Spring Boot)
Spring Boot has first-class Testcontainers support since version 3.1. The Spring Cloud AWS project has already added Floci support to its integration test setup (PR ), so the standard Wait.forLogMessage strategy works:
@SpringBootTest
@Testcontainers
class S3IntegrationTest {
@Container
static GenericContainer<?> floci = new GenericContainer<>(
DockerImageName.parse("floci/floci:latest"))
.withExposedPorts(4566)
.waitingFor(Wait.forLogMessage(".*Ready.*", 1));
@DynamicPropertySource
static void configure(DynamicPropertyRegistry registry) {
String endpoint = "http://" + floci.getHost()
+ ":" + floci.getMappedPort(4566);
registry.add("spring.cloud.aws.endpoint", () -> endpoint);
}
@Autowired
private S3Client s3Client;
@Test
void shouldUploadAndDownloadFile() {
s3Client.createBucket(CreateBucketRequest.builder()
.bucket("test-bucket").build());
s3Client.putObject(PutObjectRequest.builder()
.bucket("test-bucket").key("test.txt").build(),
RequestBody.fromString("Hello Floci"));
String content = s3Client.getObjectAsBytes(
GetObjectRequest.builder()
.bucket("test-bucket").key("test.txt").build())
.asString(StandardCharsets.UTF_8);
assertEquals("Hello Floci", content);
}
}
The @DynamicPropertySource pattern injects Floci's endpoint into your Spring context at test time. Your production code stays untouched.
Who Is Already Using It
This is not a toy project. Real teams have migrated:
Apache Camel swapped LocalStack for Floci across its entire AWS test suite. The camel-aws test suite dropped from 6.5 minutes to 4.5 minutes ().
Testcontainers for .NET shipped a first-party Floci module (.
Summary
For Spring Boot developers working with AWS, Floci solves three problems at once: no cloud bill during development, no mock-related false positives in tests, and no dependency on a dead free tier. The real-engine approach means your integration tests catch issues that mocks miss. The native binary speed means your CI pipeline runs faster. And the MIT license means it stays free forever.
If you are still pinned to an archived LocalStack image, the migration is one Docker image change. Your Spring Boot code does not need to change at all.
Sources:
- Floci official site: (16,936 stars, MIT license)
- Floci vs LocalStack comparison:
- "Who's Actually Using Floci" blog post:
- Spring Cloud AWS Floci PR:
↗ Original-Artikel auf dev.to lesenVollständiger Original-ArtikelDen kompletten Beitrag mit allen Details direkt auf dev.to lesen.
SOCIAL SHARE CARD GENERATOR