Presentation layer
➡️ handles user interactionApplication layer(backend logic)
➡️ processes business logic and data processingData layer (database)
➡️ manages data storage and retrievalYour VPC's
button on the left and then click on Create VPC
the button on the top right corner of the page172.20.0.0/16
.subnet
button which is located on the left side and then click on theCreate subnet
button on the top right corner of the page.Create subnet
button.internet gateways
button at the left panel. and then click on the Create Internet gateways
button on the top right corner of the page.Attach Internet gateway
button.NAT gateways
button on the left panel of the web page. and then click on the Create NAT gateways
button in the top right corner of the page.Allocate Elastic IP
button to allocate Elastic IP. and then click on the Create NAT gateways
button. NAT gateways creation takes 2-4 minutes.create route table.
Routes
tab at the bottom and then click on the edit route
button.Add Route
button. and select 0.0.0.0/0
in the destination field. and then click on the Target field. As soon as you click on the Target field one drop-down will open and here you have to select Internet gateway, shown in the below image.save changes
button.Subnet associations tab
next to the Routes
tab. and then click on the Edit subnet associations
. as shown in the below image. save associations
button. 0.0.0.0/0
in the destination field and click on the target. As soon as you click on the target you will see the drop-down list. Please select NAT gateway from the drop-down list. As shown in the below image.save changes
button.subnet associations
tab at the bottom next to the Routes tab. And then click on the Edit route associations
button.save association
button.action
button and there you will see the drop-down menu. Select the Edit VPC setting
button. As shown in the image.Save
buttonaction
button and then choose the Edit subnet setting
button from the drop-down list.save
buttonSecurity Groups
button. Note that SGs are specific with VPC. So we can’t use SG which is created in a different VPC. So when you create SG please make sure that you choose the right VPC. click on the crate security button on the top right corner.Add rule
button in inbound rules. And add SSH rule and add your IP in the destination. Please don’t do anything with the outbound rule if you don't have a good understanding. And then click on the create security group
button.subnet group
button on the left panel. And click on the button Create database
subnet group which is in the middle of the web page.create
button.database
button on the left panel and then click on the created database
button.stander create
because I’m going to show you each and every step. select MySQL
in the engine option because our application runs on MySQL database. If your app runs on other engines you can select that one. Furthermore, you can select the engine version my application is compatible with MySQL version. But you can select according to the developer guild.Dev/test
as template. If you select the free tier
then you won’t be able to deploy RDS in a multi-availability zone. Select Multi-AZ DB instance
from availability and durability option. In settings give any name to your database. In the credential setting give the username of the database in the Master username field and give the password in the Master password field. And then confirm the password below. Please do remember your username and password.Brustable class
in the instance setting and select the instance type. Actually, it depends on your application uses. But for learning purposes, I am selecting t3.micro
. now in storage type select General purpose(GP2)
and allocate 22 GiB
for database. Please uncheck the auto-scaling option to keep our costs low. And In the connectivity option please select the option according below screenshot.No
, choose existing security
, and select security group book-rds-db.test
because we need a database with the name of the test
in the application. Enable Automated Backup. Note: you have to enable automated backup otherwise you won’t be able to create a read replica of the RDS instance.Create database
button below.Available
then select the database and click on the Action
button. There you can see the drop-down list. Please click on created read-replica
.Oregon (us-west-2)
. Give a name to your read replica, and select all the necessary configurations that we did before while creating the database. For your reference, I have shown everything in the below images.create replica
. It will start creating that.Create hosted zone
.create record
button on the top right corner.simple routing
,defined record
button in the middle of the box.book
in the record name field. In the record type select CNAME
. In the value field paste endpoint of the RDS which is in us-east-1. Then click on the defined record button
.create record
button.ankitjodhani.club
in Route 53. Now I am going to use this domain name to create subdomains such as api.ankitjodhani.club
and that will resolve ALB-backend DNS. Furthermore, we need an SSL certificate so that we can make the connection secure.list certificates
button on the left panel and then click on the request certificate
on the top right corner.next
button. *.Your_Domain_Name.xyz
in my case it is *.ankitjodhani.club
DON’T DO ANY TYPO. In the validation method select DNS validation and click on the request certificate
.create record in route 53
and click on the create record button. That’s itissued.
target group
button on the bottom of the left panel. And click on the create target group
button in the middle of the page. Next
button.create target group
button.create target group
button. Select the target type Instance. Again give some meaning full name such as ALB-backend-TG. Select VPC that we have created.next
button. creatd target group
. That’s it.Load Balancer
button at the bottom of the left panel and click on the create load balancer
button. First, we will create ALB for frontend.create button
.create load balancer
button.Created Load balancer
buttonadd listener
the button that is located on the right side.HTTPS
. Default Action should be Forward and select ALB-backend-TG
. Now we need to select the certificate that we have created. So in the Secure Listener setting select the certificate. And click on the add
button below.