Appearance
Fresh
Run tests
Back
Testing AWS service integrations using LocalStack
Learn how to create a Spring Boot application with Spring Cloud AWS, then test S3 and SQS integrations using Testcontainers and LocalStack.
Java Testing with Docker
25 minutes
Run tests and next steps
Copy as Markdown
Open MarkdownAsk Docs AIClaudeOpen in Claude
Table of contents
Run the tests
console
$ ./mvnw testOr with Gradle:
console
$ ./gradlew testYou should see the LocalStack Docker container start and the test pass. After the tests finish, the container stops and is removed automatically.
Summary
LocalStack lets you develop and test AWS-based applications locally. The Testcontainers LocalStack module makes it straightforward to write integration tests by using ephemeral LocalStack containers that start on random ports with no external setup required.
To learn more about Testcontainers, visit the Testcontainers overview.