Creating Private EC2
I am creating the Private EC2 in the Private Subnet and selecting the custom VPC
Not mentioning Dockerization steps here
You can access this EC2 using Endpoint or Jump server
How to create a Jump Server
Just create another EC2 but with Public Subnet Group with Public IP, create a file inside the EC2, and paste the private key inside this pem file and the pem file name should be the same.
sudo nano keyname.pem
chmod 600 keyname.pem
Dockerize your app own using the docker steps
Creating Application Load Balancer
Click to create a Load Balancer
- Configuration should be like this
- Select VPC and the Public Subnet only
- Select Security Group and Create a Target Group (Load Balancer listener should be 80)
Creating Target Group
- Enter the container port here
- Select the Server for the ALB and click to Include as pending below (the port which we mentioned above it will automatically come to the next step)
- Click to Create target group
- Return to the previous page and select the target group
443 Listener
We can also add a 443 listener, and we can import the ACM through it so it will map the SSL on our ALB Endpoint directly
- Now open the Port 3000 also in our EC2 security group
Endpoint or DNS Name
With the below DNS Name URL, we will be able to view our Application content
my-lb-1-889795383.us-east-1.elb.amazonaws.com
Thank you for reading my blog.