Every IAM error, every Docker rate limit, every Testcontainers gotcha documented. The guide I wish existed when I started.
Most AWS deployment guides show you the happy path. This one shows you the whole road — including the potholes.
This is the complete walkthrough for deploying a Spring Boot app to AWS ECS with a real CI/CD pipeline. GitHub Actions for testing. CodePipeline + CodeBuild for deployment. Every IAM permission. Every command. Every error documented.
What You're Building
GitHub PR → GitHub Actions → tests pass → PR shows ✅
GitHub push to main → CodePipeline
→ CodeBuild (test + build JAR + build Docker image + push to ECR)
→ ECS rolling deploy (zero downtime)
→ SNS email notification
Stack:
Spring Boot 4.0.5 / Java 21 / Maven
MySQL 8 on Amazon RDS
Docker → Amazon ECR
Amazon ECS
GitHub Actions + AWS CodePipeline + CodeBuild
Step 1 — RDS MySQL
Create a db.t3.micro instance (free tier eligible):
Engine : MySQL 8.0
Template : Free tier
Public access : Yes (dev only — lock this…