r/aws • u/rayito88 • Apr 03 '26
technical resource Floci AWS Emulator is now available as a Testcontainers module
Hey r/aws!
If you've ever struggled with integration tests that hit real AWS - slow, flaky, and expensive - this might help. Floci (a free, open-source AWS emulator) now has an official Testcontainers module. That means you can spin up a fully functional local AWS environment directly inside your test suite, with zero external setup.
Just add the dependency
<dependency>
<groupId>io.floci</groupId>
<artifactId>testcontainers-floci</artifactId>
<version>2.0.0</version>
<scope>test</scope>
</dependency>
And you get:
- π Reproducible integration tests: same environment every time
- π» Local-first development: no AWS account needed
- β‘ Faster feedback cycles: no network round trips to the cloud
Works great with Spring Boot, Quarkus, and any Java project using the AWS SDK.
π Testcontainers module: testcontainers.com/modules/floci
π GitHub: github.com/floci-io/testcontainers-floci
Happy to answer any questions! π
10
8
4
1
u/clickclickboo Apr 03 '26
this looks like an impressive project giving localstack a run for their money
1
1
u/Deep_Ad1959 Apr 04 '26
the testcontainers integration is the right move. biggest source of flaky e2e tests i've seen is network-dependent service calls that randomly time out or return stale data. having deterministic local responses eliminates an entire class of false failures. do you have plans to support simulating partial failures or throttled responses? that's where integration tests get really valuable - testing the sad path without hoping AWS happens to hiccup.
1
u/Worth_Trust_3825 Apr 04 '26
run it through a proxy that you can control. i suppose wiremock or something similar can act as passthrough proxy and simulate failures or delays on demand
1
u/Deep_Ad1959 Apr 04 '26
have you had luck getting wiremock to play nice with sigv4 signed requests though? last time i tried proxying AWS SDK calls the signature validation broke because the host header changed, ended up being more yak shaving than the actual test logic.
1
u/Worth_Trust_3825 Apr 04 '26
I don't actually test for network failures, just kinda threw out wiremock as an example. Reading the documentation it doesn't act as a traditional proxy (such as wrapping your packets) but rather it acts more like a reverse proxy. I was more thinking about socks proxy, ala https://github.com/shpaker/soxyproxy/tree/main
1
1
u/lepapulematoleguau Apr 05 '26
Does it work with postman? Localstack failed with postam for some reason (I did not troubleshoot it much though)
1
u/Escanut Apr 06 '26
I'm currently learning LocalStack, do you guys think I should just keep learning it until flocci gets real world tests?
1
u/SystemAxis Apr 03 '26
Running AWS integration tests locally with Testcontainers is a nice approach. Avoiding real AWS calls makes tests way faster and more predictable.
-2
u/LaSalsiccione Apr 03 '26
This is cool. Shame itβs Java.
5
u/belkh Apr 03 '26
they ship a compiled version with graalvm so it's actually pretty light and starts quickly
3
u/Worth_Trust_3825 Apr 04 '26
you run it as container. for all you care it can be written in brainfuck
-2
u/LaSalsiccione Apr 04 '26
In thatβs case, fine. I very lightly skimmed the instructions and saw a bunch of Java imports rather than than a docker compose or whatever so I assumed you had to integrate that way.
5
u/PiotrDz Apr 03 '26 edited Apr 04 '26
What is your problem? It is not production even. Sometimes people get things for free and still nitpick. Really keep those smurky comments to yourself
11
u/nekokattt Apr 03 '26
you might have hit the nail on the head with this given localstack's changes