Getting started with AWS — One of the most powerful tools in the 20th Century
We have heard of AWS (Amazon web service). It is one of the most powerful tools, we are using in the 20th century. It has almost all the infrastructure services one can use to build any world-class product. It has services for Virtual machines, Databases, robotics, Blockchain, Gaming, and Machine learning and there is a long list of other services it provides. If I list all the services, the blog will end in that itself 😅
In this blog, we will see “Why AWS is the most powerful tool 🚀” and “What it offers”. There are many services but some of the most used services which are described in this blogs are :
- Route 53
- Elastic Load balance
If you are a beginner then it would be an alien 👽 conversation for you but by end of this blog, you will be having enough basic knowledge of these services. So let's start and dive deep into the basics of AWS.
Before knowing about services, we have to go through the IAM roles we can create as root users in AWS Console. In AWS we have two types of user roles:-
- Root User:- This type of user has all the permissions, or we can say it is the admin, owner of that AWS account.
- IAM User:- This user role has been created by the root user. The root user can create any number of IAM users with specific permissions. Let’s take an example if there are multiple developers and you want that specific developer can access only that part he/she is working on. Then you can create an IAM role with that specific role (like Database read/write access for data storage).
If you are a root user OR IAM user with proper permissions, we are ready to explore the different services of AWS.
1. Amazon Elastic Compute Cloud Service (EC2) 💻
This is the most common service used in AWS. EC2 are Amazon machines with different variety of configurations. We have the option to select the Operating system, Architecture, disk space, n/w config, Subnets, number of CPUs, and memory. Isn’t it cool, we can prepare our own machine by just clicking on some buttons.
And we have UI too, to connect to that PC. But it’s a little difficult to use that UI 😅. If you have used EC2, you know what I mean. Yes, it's the “Terminal” using which we will be communicating to the EC2 machines (There are other ways too).
Later in the series of Blogs, we will see even if we have the option to choose where we can put our instance. Like It should be in “same rack” or in “different countries” or if in “same country and same rack”. This selection process is known as placement groups.
Below is an illustration of how the placement groups' hierarchy works. There are Regions -> Available Zones -> Edge Locations -> m/c Racks.
Machines and some services are put under different regions like Asia, us-east. They are distributed in different locations with different zones under that location. These placement groups are important because they determine the latency and availability of the resources.
Below two cases will show how placement groups affect Latency and Availability.
Latency → It is about how fast the machine will respond.
[ Higher latency → faster the response → lower the waiting time]
Availability → It is about the Availability of your machine to respond back. If one of the servers in region A goes down. There should be another server available to respond back to our query.
First Case: If we have two machines on which different services of a web portal are running. Then to take care of availability, we should keep those machines in different regions. As if one region goes down (that does not happen most often), then others should be there to take care of the users of the web portal.
Second Case:- If you want your web portal to respond fast then the two EC2 should be kept close. So they can communicate faster. It means we have to put them in the same rack or in the same Edge Location. It will help us to maintain high latency [defined above].
There are many more things that are related to EC2. Later in the series, we will have a dedicated Blog for this topic.
2. Amazon Route 53 🚧
As the name suggests, we have to do something with Routes. Yes, we have to take care of routes. It means it’s a AWS Domain name system, where all Domain name to IP mapping and many other things takes place. If you are from a networking background, you know how to create A, AAAA or CNAME records which help in mapping and having an alias for the domain.
As Route 53 is AWS’s maintained Domain name system, it has many unique features that make it special. It has hosted zones, Traffic management, monitoring, and Domain registration. Route 53 can be configured with the load balancer to distribute the Load according to Geolocation, weighted rules, latency, and more.
After buying the domain, it will be added to Hosted Zones and zones can be Public or Private. It means if Zone is Public, then it can be used by the outside world (or through the internet). But if it's Private Zone then it will be limited to a network. There comes the role of VPC, which can help us to build a private ecosystem or private network.
Once the hosted zone is created, we can create domains with different Routing policies. Route 53 provides different Routing policies which can help maintain different factors like Availability, load distribution, location handling, and latency. We will see more about these in detail, later in the series of blogs.
3. Virtual Private Cloud (VPC) ☁️
Virtual private cloud is like providing a restricted network to an EC2 machine, where you add rules to the routing table and make your network of machines private or public.
While creating the Instances, we have to select a VPC in which our EC2 will exist and we can have any number of machines in different VPCs.
Note:- To maintain all the network-related things. Amazon servers have the NIC card [Network Interface Cards].
Further, into the Virtual Private Network, we can create subnets where EC2 machines will actually exist. And to manage Rules under those Subnets, we have the Routing Tables.
In the above representation, we have created a VPC with IP 10.0.0.0/16. Here “/16” means while creating the subnets we cannot change the bits till 10.0 and rest of the bits can be changed to create the subnets.
NOTE - If you are not able to get all these calculations. Not to worry, we will have a separate section for VPC.
In Public machines, anyone can enter using HTTP, HTTPS, TCP etc (according to the security groups). Security groups are the set of rules, we add up on the EC2 instance. There are Inbound and Outbound rules for EC2, below is the illustration for the Security Groups Rules.
We can modify the Security Groups Rules by just adding the Inbound and Outbound rules for the following types of Protocols like HTTP, HTTPs.
And In Private Machines, No one from outside (from internet) can enter into the machine but the machine can connect to the Internet. This type of behavior is achieved through the NAT Gateways or NAT Instances. NAT gateway/instance is always created into the Public Network.
4. Elastic Load Balancer 🤸♀️
As the name suggests, we have to manage the Load which comes through the internet (In form of users/requests) and goes on the EC2 machine (which is acting as a server). So node balancer is a way through which we can divide the load between different machines (In form of target groups) on the bases of some defined rules.
Here different EC2 machines are put under different Target Groups and the Load balancer points to those Target Groups based on Rules. Rules are the conditions based on which we validate and then route the traffic to the Target Groups.
In this case, Front end request comes to Route 53, and later Route 53 maps it to the Elastic Load balancer and ELB then checks the Rules and routes the request to a particular Target Group. And then inside the Target Groups requests are distributed accordingly.
There are different types of Load balancers in AWS:-
- Classic Load Balancer:- This type of load balancer checks for the healthy instances and move the requests on those instances if some other instance is unhealthy.
- Application Load Balancer:- This type of load balancer works on the HTTP and HTTPS protocol, Which is the Application layer of the OSI model.
- Gateway Load Balancer
- Network Load Balancer:- This works on UDP/TCP protocol, which is the Network layer of the OSI model.
Later in the series, we will see each one of them in detail and will be creating each load balancer and will test them.
Now we have enough knowledge of AWS basics and we also know about the different services that AWS provides. You should be able to answer these questions now :
What is AWS EC2 ?
What is AWS Route 53?
What is AWS VPC?
What is AWS Load Balancer?
Now we are ready to move on to implement and see how those services are created and work in real life. This will be an interesting journey, tighten your seat belts, we are ready to take off ✈️
If you liked this blog, you will also find the following Ionic blogs interesting and helpful. Feel free to ask any questions in the comment section
- Ionic Payment Gateways — Stripe | PayPal | Apple Pay | RazorPay
- Ionic Charts with — Google Charts| HighCharts | d3.js | Chart.js
- Ionic Social Logins — Facebook | Google | Twitter
- Ionic Authentications — Via Email | Anonymous
- Ionic Features — Geolocation | QR Code reader| Pedometer
- Media in Ionic — Audio | Video | Image Picker | Image Cropper
- Ionic Essentials — Native Storage | Translations | RTL
- Ionic messaging — Firebase Push | Reading SMS
- Ionic with Firebase — Basics | Hosting and DB | Cloud functions
Ionic React Full App with Capacitor
If you need a base to start your next Ionic 5 React Capacitor app, you can make your next awesome app using Ionic 5 React Full App in Capacitor
Ionic Capacitor Full App (Angular)
If you need a base to start your next Angular Capacitor app, you can make your next awesome app using Capacitor Full App
Ionic Full App (Angular and Cordova)
If you need a base to start your next Ionic 5 app, you can make your next awesome app using Ionic 5 Full App