This article will talk about creating a Spring Boot microservices application, deploying it on an EC2 instance and then exposing the REST endpoints via the Api Gateway. Here’s the architecture we intend to achieve
I’ve created a sample app. You’ll find the code here. It has its own version of an H2 database. You’ll find the dockerized version here . We’ll be deploying it to the EC2 instance.
Since this is a very small application, we’ll choose the smallest instance available. The next set of images will walk you through the steps of creating the instance.
Choose the defaults on the rest of the settings
Now choose a key pair to connect to your instance or create a new one. Download it on your local machine.
You’ve now created an EC2 instance with a key pair to connect via ssh.
The next set of images will show you how to create an NLB. Go to the Load Balancers section in the EC2 service and begin. This can be used to balance multiple EC2 intances
#docker #aws #spring-boot