Getting Started with AWS

Part 1

malindu ruwantha
5 min readJul 11, 2021

First, let's have an understanding of how an online application works. Mainly web applications provide information to the end-users. So there should be two parties as an information requester and the information provider, mapped into the client and the server known by the computing world.

These web applications will be hosted on distributed servers around the world. In simple terms, AWS provides the needed infrastructure to host your applications.

In addition to that AWS will fulfill your needs on
1.Computing
2.Storage
3.Network security
4.Blockchain
and so on…...

So cloud computing can be described as on-demand consumption of computing power, database, storage, and other IT-related services through a cloud services provider through the internet.

In the AWS world, the typical server of the client-server model is replaced by Amazon Elastic Compute Cloud. This is a virtual server instance also known as the Amazon EC2 instance.

Let's say you are going to launch an application to the public. Without using a third-party cloud service provider, you will initiate an on-premises data center to fulfill the server and the data storage requirements. Initially, you don't have a clear idea about the needed storage capacity, User traffic, and the processing power you needed. You just do estimation and then order the needed hardware. when the time goes what if there is a sudden growth of the hits for your application, what if the traffic increases. you might need to scale your infrastructure again which may be costly and a time-consuming process. but if you use AWS instead of your own servers, Scaling can be handled only with a couple of clicks. Either you can increase the EC2 instances that you are using or you can increase the storage and processing power of an EC2 instance.

Advantages of using AWS cloud services.

  • No huge initial cost
    Instead of having to invest heavily in data centers and servers initially, you can pay for the consumption of resources
  • Pay as you go prices
    you can buy or terminate the EC2 instances at any time.
  • Do not need to estimate the capacity when you are setting up your own data centers you might need to estimate the storage and computing needs. but when using AWS you can scale your resources according to your needs.
  • No need to worry about the performance issues of the resources
  • Go global in minutes
    As there are data centers all around the world waiting time for a response will be minimum..wherever you access the service responses will be generated from the closest instance of your EC2

These advantages may be benefit from most cloud service providers.

Deployment models of cloud computing

Amazon Elastic computer cloud
you already know what the EC2 instances replaced. Let's examine the benefits you gain by using Ec2 instances rather than the typically dedicated hosts.

  1. you can choose the operating system you need and the other computational specifications
  2. you are using a shared host that enables cost-effectiveness.
  3. you can launch an Amazon instance with a couple of clicks and can terminate at any time..you will be charged only for the computational time you used
  4. can be scaled vertically(Increasing the EC2 instances).

Amazon EC2 Instance types

Scaling Your Application

Most of the applications would receive variable demand or the user hits over time. So it is important to design your application architecture to provide its services without any interruption. As an example, if we graph the user traffic against the time it would be looks like follows.

So how would you allocate resources for this application? Is it to suit the average user demand or for the highest user demand? If you assign resources for the average user demand, the application will be down in the peek times. If you assign for the highest you are paying more. So what will be the solution?
It's non-other than going for on-demand cloud resources.
then you can assign resources according to the demand. higher resources for the peak times and you can terminate the resources when the computing demands are low.

If you want to do this scaling process without any user interaction, you can use AMAZON EC2 Auto Scaling Service. then you won't need to worry about the computing capacity of your application.AWS will handle it on your behalf.

With the Amazon Auto Scaling service, it will append more Amazon EC2 instances to meet the computing requirements for your application.

mainly there are two approaches

  1. Dynamic Scaling (Respond to changing demands)
  2. Predictive Scaling (scheduling the resources based on the predictions)

Note: You can configure AMAZON EC2 Auto Scaling by providing the minimum and a maximum number of instances to be provisioned with the varying demand.

but when the user traffic increases Amazon will automatically provision another EC2 instance to meet the requirements.

Load Balancing with AWS

With the Amazon Auto Scaling feature, we can handle the varying user traffic. How can we distribute the incoming requests among the instances?
Yes, That's where we need to have a load balancing mechanism to control the distribution of traffic among the instances.

The load balancer will act as a single point that inputs the incoming user traffic. Then it will distribute the requests evenly within the alive instances. This is an instance where single-point failures might erose. Because of that load balancers should be highly available. With Amazon web services you can use several load balancers and also AWS provide their own as Elastic Load Balancing.

Now we can alter our architectural diagram as follows.

Amazon elastic Load balancing service and Amazon EC2 Autoscaling service will be together handling the user traffic by routing the load across the instances and scaling the number of instances to deliver high performance for your application.

Now with the above-discussed services your overall architecture will be as follows.

In the next part let's further investigate some Amazon web services.

--

--