Which AWS compute options can run a Spring Boot app and how do you choose?
basicPick the lowest-operations option that meets your control, scale and cost needs.
- EC2: full control of VM and JVM, cheapest at steady load, you patch and scale it (ASG).
- ECS on Fargate: serverless containers, no nodes to manage, pay per vCPU/GB-second; the usual default for teams without Kubernetes needs.
- ECS on EC2: containers on your own nodes, better bin-packing and GPU/special instances.
- EKS: managed Kubernetes control plane; choose for portability, ecosystem (Helm, operators) or existing K8s skills.
- Lambda: event-driven, scale to zero; JVM cold start and 15-minute limit matter (SnapStart, native image help).
- Elastic Beanstalk / App Runner: PaaS-like, fastest to start, less control.
- Is Fargate always cheaper than EC2? No, at steady high utilization EC2 (especially Reserved/Spot) is cheaper.
- Is EKS Fargate the same as ECS Fargate? No, different control planes; EKS adds Kubernetes API and per-cluster cost.