Just as I mentioned in my earlier article - I am a Hard-Core Java/Java EE/Microservices Architect with an overall experience of ~17y. It also includes a book published on Microservices Architecture, with 3 more in the pipeline. Consider to buy my Book on Microservices Architecture : The Decision Maker from Notion Press, Flipkart or Amazon.
For the last about ~4y, I have been working on projects that used the Amazon Web Services (AWS) in some form or the other. But always my involvement was as a Decision Maker on AWS (Discussions/Decisions with DevOps Team on things like ECR, ECS, EKS, K8s on EC2, ...). For the last about 2 weeks, I have been working in this amazing world of AWS Step Functions, AWS API Gateway and AWS Elastic Beanstalk. This time as a Hands-On PoC Developer, not just as a Decision Maker. Absolutely amazed by the power that AWS brings to every aspect of Enterprise Software Development. Elegant Problem Solving with very few errors, bugs, surprises and a large community providing support and sharing their experience.
In this article, we will understand how to move your Spring Boot/REST service and deploy it publicly on the AWS Elastic Beanstalk. In case you have very specific requirements to deploy Java/Java EE on Tomcat, as opposed to a more enterprise virtual server - It is better to go for AWS Elastic Beanstalk. Internally, Elastic Beanstalk may actually be using/provisioning an EC2 instance.
From the Official AWS Documentation.
"AWS Elastic Beanstalk is an easy-to-use service for deploying and scaling web applications and services developed with Java, .NET, PHP, Node.js, Python, Ruby, Go, and Docker on familiar servers such as Apache, Nginx, Passenger, and IIS.
You can simply upload your code and Elastic Beanstalk automatically handles the deployment, from capacity provisioning, load balancing, auto-scaling to application health monitoring. At the same time, you retain full control over the AWS resources powering your application and can access the underlying resources at any time.