I've developed a Spring Boot application with a Thymeleaf-based UI that generates OTPs and sends them via SMTP, and everything runs smoothly on localhost:8080. Now, I'm looking to deploy it on AWS to make it accessible online. My main questions are: Which AWS service should I use to host my Spring Boot and Thymeleaf application? Should I go with EC2, Elastic Beanstalk, ECS, or another option? Also, since I'm using Thymeleaf for server-side rendering, do I need to use S3 for hosting the frontend, or is that unnecessary?
2 Answers
You might want to consider putting your WAR file into a Docker container or using a cloud-native build pack, then deploying it to ECS or Fargate. Since Thymeleaf is server-side rendered, you won't need S3 unless you want to offload static resources to CloudFront. Just keep in mind that you'll need an ALB or an Elastic IP plus a VPC to serve traffic to the internet.
Thank you so much, it worked like a charm!
It really comes down to how much you're willing to spend and the number of users you expect. Also, consider using a deployment tool like CDK or Terraform to automate the process.
Thanks, I will try using Docker!