Server Side Chat: Accelerating Java Cloud Development with TestContainers and LocalStack

Cloud-native applications have transformed how software is built, but they come with a challenge: how do developers test cloud-dependent applications efficiently without relying on cloud environments? Andrews dos Reis tackled this issue in his latest Server Side Chat on Accelerating Java Cloud Development with TestContainers and LocalStack.

In this talk, Andrews demonstrated how developers can run AWS services locally, speeding up development cycles, reducing cloud costs, and making integration testing seamless.

The challenges of Cloud-Native Development

Modern applications rely on AWS services like S3, RDS, Lambda, and ElastiCache. However, testing these services presents several roadblocks:

  • Dependency on AWS: Running tests against live cloud environments is slow and costly.

  • Mocking Limitations: Many developers resort to mocking AWS services, but mocks fail to capture real-world behavior.

  • Infrastructure Setup: Spinning up cloud environments for every developer or CI/CD pipeline increases complexity and costs.

To solve these issues, Andrews introduced LocalStack and TestContainers, two powerful tools that enable developers to simulate cloud services locally.

Take a look at the recording of Andrews' Server Side Chat below 👇

What is LocalStack?

LocalStack is an AWS cloud emulator that allows developers to run AWS services on their local machine. With LocalStack, teams can:

·      Run AWS services like S3, DynamoDB, SQS, and Lambda without connecting to AWS.

·      Test integrations and API calls faster and without incurring cloud costs.

·      Debug cloud applications locally before deploying to production.

LocalStack offers a community edition (free) and a pro version with advanced capabilities like AWS service persistence, hot reloading, and improved performance.

What is TestContainers?

TestContainers is a Java testing library that simplifies integration testing by running services in isolated Docker containers. With TestContainers, developers can:

·      Spin up temporary, disposable environments for cloud services.

·      Automate testing of AWS integrations without mocks.

·      Run tests in CI/CD pipelines for reliable, cloud-like environments.

TestContainers supports AWS LocalStack, making it the perfect tool for Java developers working with AWS-based applications.

By integrating TestContainers and LocalStack, developers can create robust, production-like test environments locally, reducing cloud costs and accelerating feedback loops.
– Andrews dos Reis

Live Demo: The "Dunder Mifflin" Cloud App

To showcase these tools in action, Andrews built a fictional cloud-based Java application inspired by The Office. This CRUD system for employees featured:

  • AWS S3 to store employee photos

  • AWS RDS for relational data storage

  • AWS ElastiCache for caching frequent queries

  • AWS SQS for processing employee-generated quotes

  • AWS Lambda + API Gateway for fetching trivia about The Office characters

Key Takeaways from the Demo

  1. Faster Testing: Running AWS services locally with TestContainers + LocalStack speeds up integration testing.

  2. Cost Savings: Eliminates reliance on cloud-based test environments, reducing AWS costs.

  3. Improved Debugging: Logs and debugging tools are available locally, making bug fixing easier.

  4. Infrastructure as Code (IaC) Integration: Supports Terraform and Shell scripting for automated local environments.

Build the Server Side Chat community with us

Our Service Side Chats are more than just presentations; they are an opportunity to connect with like-minded professionals, share experiences, and learn from each other. We look forward to seeing you at our next meetup on February 13.

Our goal with the Service Side Chat community is to create a vibrant community where professionals can share knowledge, discuss innovative ideas, and collaborate on projects related to server-side technologies. We encourage anyone to join our community on Meetup.

Thanks for reading.
Now let's get to know each other.

What we do

WAES supports organizations with various solutions at every stage of their digital transformation.

Discover solutions

Work at WAES

Are you ready to start your relocation to the Netherlands? Have a look at our jobs.

Discover jobs

Let's shape our future

Work at WAES

Start a new chapter. Join our team of Modern Day Spartans.

Discover jobs

Work with WAES

Camilo Parra Gonzalez

Camilo Parra Gonzalez

Business Manager