Kick off your book project in 3 hours! Live workshop on Zoom. You’ll leave with a real book project, progress on your first chapter, and a clear plan to keep going. Saturday, June 6, 2026. Learn more…

Leanpub Header

Skip to main content

Beyond the Tutorial: Building a Real Spring Boot Service on AWS

This book is 100% completeLast updated on 2026-05-10

You can build a controller. You can wire up a repository. You can probably get a Spring Boot app running in under ten minutes.

But can you build a service that feels real?

This book takes you beyond the tutorial version of Spring Boot and into the parts that actually matter: clean structure, security, persistence, testing, containers, AWS deployment, observability, and the trade-offs that separate demo code from production-minded software.

Build a real Spring Boot service. Ship it to AWS. Learn how backend systems are actually put together.

Minimum price

$18.99

$20.99

You pay

Author earns

$
PDF
EPUB
WEB
About

About

About the Book

Building a Real Spring Boot Service on AWS is a practical guide for developers who are ready to move past toy projects and build something that looks and behaves like a real backend service.

Instead of stopping at CRUD endpoints and a local database, this book walks through the full journey of designing, building, securing, testing, deploying, and operating a Spring Boot application in a production-style environment. You’ll build a complete service with authentication, persistence, messaging, Docker, AWS deployment, observability, and the engineering trade-offs that real systems demand.

This is not a book about copying snippets and hoping they work. It is a book about understanding how the pieces fit together: how to structure a service, how to make sensible architectural choices, how to ship to AWS, and how to build software that can survive outside your laptop.

If you’ve finished a few tutorials but still feel unprepared to build a serious service from scratch, this book is for you.

Share this book

Categories

Author

About the Author

Jitin Kayyala

Jitin Kayyala is a Sun Certified Java Developer with over 15 years of experience designing and developing enterprise-scale web applications. He specializes in cloud-native architecture, microservices, and DevOps practices. His technical leadership spans Java, Spring Boot, AWS, Kubernetes, and distributed systems architecture.

Contents

Table of Contents

Who this book is for

  1. What this book is not
  2. How to read this book
  3. A note on opinions
  4. Acknowledgments

Chapter 1: Why Tutorial Knowledge Isn’t Enough

  1. What tutorials teach you
  2. What tutorials don’t teach you
  3. The seven things tutorials skip
  4. The “real-shaped” project
  5. The plan
  6. A request

Chapter 2: Project Overview — Habit Tracker Requirements

  1. What we’re building
  2. Why this domain
  3. User stories
  4. Out of scope (for now)
  5. Non-functional requirements
  6. API surface (preview)
  7. Data model (preview)
  8. Why we’re spending a chapter on this

Chapter 3: Designing the Domain and DTOs

  1. Two layers, one habit
  2. The domain entities
  3. Behavior on the entity
  4. The DTO layer
  5. Mappers
  6. Validation: the two layers
  7. Errors
  8. Where this leaves us

Chapter 4: Monorepo Structure with Gradle

  1. What is a monorepo, really?
  2. The structure we’re building
  3. Step one: initialize Gradle
  4. Step two: settings.gradle.kts
  5. Step three: the version catalog
  6. Step four: the root build.gradle.kts
  7. Step five: a platform-lib module
  8. Step six: another platform-lib module
  9. Step seven: the actual service
  10. Step eight: a placeholder application class
  11. Step nine: try the build
  12. A note on the gradle.properties
  13. What we just did

Chapter 5: Implementing the Core Spring Boot Service

  1. The package layout
  2. Starting with the DTOs
  3. The domain entity
  4. The repository port
  5. In-memory implementation
  6. The application service
  7. The exception
  8. The mapper layer
  9. The controller
  10. The current-user annotation (temporary version)
  11. Global exception handling
  12. Wiring up the profile
  13. Trying it out
  14. A test
  15. What we have so far

Chapter 6: Authentication and Authorization with JWT

  1. What we’re building
  2. Adding what we need
  3. The User entity and repository
  4. The JWT service
  5. The principal type
  6. The JWT filter
  7. The security configuration
  8. The auth controller
  9. Updating the @CurrentUserId resolver
  10. Configuration
  11. Try it out
  12. Tests
  13. What we just did

Chapter 7: Persistence with JPA and Flyway

  1. Postgres locally
  2. Adding the persistence dependencies
  3. The first migration
  4. Configuring Flyway and the datasource
  5. JPA entities
  6. Spring Data JPA repositories
  7. Completions service and endpoints
  8. Stats: streaks and completion rate
  9. Testing with Testcontainers
  10. What we just did

Chapter 8: Messaging and Events with SQS

  1. Why SQS?
  2. The mental model
  3. The domain event
  4. The publisher abstraction
  5. The SQS implementation
  6. Configuration: which publisher do we use?
  7. Publishing the event
  8. The consumer
  9. Configuration
  10. Testing event publication
  11. Where this leaves us

Chapter 9: Dockerizing the Service

  1. What’s actually in a Spring Boot fat JAR
  2. Layered JARs
  3. The Dockerfile
  4. .dockerignore
  5. Building the image
  6. docker-compose for the full local stack
  7. Image size: where the bytes go
  8. Tagging and registries
  9. Smoke test the image
  10. Where we are

Chapter 10: Deploying to AWS

  1. What we’re building, architecturally
  2. Terraform layout
  3. First deploy
  4. GitHub Actions
  5. What I’m leaving out
  6. Where we are

Chapter 11: Observability

  1. Spring Boot Actuator: the foundation
  2. Securing the endpoints
  3. Custom metrics
  4. Structured logging
  5. Correlation IDs and MDC
  6. CloudWatch Logs Insights queries
  7. Health checks: liveness vs readiness
  8. Graceful shutdown
  9. What about distributed tracing?
  10. Where we are

Chapter 12: Hardening and Next Steps

  1. Part 1: Hardening checklist
  2. Part 2: Feature ideas and what to build next
  3. Career thoughts
  4. A final word

Afterword

  1. Things I changed my mind about while writing
  2. Thanks

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub