Introduction to AWS

Cloud computing has been a buzz around the world for a long time and AWS is one of the top cloud providers. Before I delve into details let’s take a pause and learn a little about what the cloud is all about. Alright, I will simply summarize the cloud. Earlier, if we needed to host a website, we had to purchase a computer, servers, set up the network, etc. But things have changed with IaaS (Infrastructure as a Service) where different cloud providers manage all the underlying infrastructure and we just have to install or create applications on them. This has revolutionized the way applications are provided for the end user. The costs are as per the pay-per-usage model, scaling is automated, fault tolerance, high availability, and many more features.

Amazon Web Services:

AWS, owned by Amazon, is one of the most used cloud providers to host applications, websites, batch processing, data transformation, etc. because of its simplicity, cost-optimized solutions, and high availability. AWS provides many services that aid the full cycle of software development, machine learning, and other technical developments. Let me just give you a glimpse of some of the most used terminologies and services in AWS.

Terminologies:

Regions:

AWS data centers are distributed globally in different geographical locations and are isolated from one another for fault tolerance and high availability. These are called regions. Examples include US-East (Northern Virginia), US-West (Oregon), Asia Pacific (Mumbai), etc. 

Availability Zones (AZs):

Regions have clusters of data centers, and each is isolated from others within a region. These are called availability zones. All AZs in a region are connected via ultra-low latency, high bandwidth dedicated metro fibers to increase throughput and provide high availability in a region. Examples of AZs in the US-East are us-east-1, us-east-2, etc., and 6 AZs within the US-East region.

Availability:

It describes if your application is available at all times. It depends on the infrastructure, security, traffic, performance, scalability, and how the application is built. AWS ensures high availability by distributing services across AZs and regions (depending on the user configurations) and the customers need not worry about the availability of resources.

Scalability:

You might have heard about outages on different social platforms, streaming platforms, etc. Why do you think it happens? When the machines used to provide the application reach their capacity, they will not be able to serve incoming requests, causing downtimes. Scalability is a property where machines handle the traffic by increasing the resources depending on the configurations. AWS provides scaling [Autoscaling] of systems based on different configurations like predictive, step scaling, etc. Should the need arise, I will discuss it in detail about the types.

Latency:

It is defined as the delay between a request and a response. If to be spoken in terms of networking, the amount of time a packet of data takes to transfer from source to destination is latency. Even the minimum amount (50ms) of latency could affect the network and performance of the application. The causes could be where the application is on the network, congested network, busy routes, location, etc. AWS Global Accelerator handles latency by routing the traffic, using its global network, in an optimal route.

Distribution:

Let’s just say an application is hosted on the servers in the US and you are accessing it from India. This will significantly increase the latency which affects the application performance. AWS handles the distribution of the application files using its edge locations, Cloud front, etc. 

Security Groups:

These are the rules that are defined for several AWS services to control the inbound (into the services) and outbound (from the services) traffic of the service. We can define specific IPs and port numbers to control the traffic. These play a significant role in securing the applications. How we configure and use them is a topic for another article.

Identity and Access Management (IAM):

It is an AWS service that assists users in securely accessing the services. IAM users are associated with a person or account to provide restricted access to resources. IAM roles are similar to IAM users but are used to temporarily access AWS resources. Roles are associated with IAM users, applications, or AWS services to access other AWS services.

Virtual Private Cloud (VPC):

It is an isolated private cloud environment (in the public cloud) where applications are hosted and security groups are defined to restrict inbound and outbound traffic. There are subnets, gateways, route tables, etc. like any network. We can communicate between different VPCs using peering but that is beyond the scope of this discussion.

Load Balancers:

As the name says, these are used to balance the load between applications. The incoming traffic will be distributed among the machines under the load balancers. The load balancing can be at the global level (routing the traffic to the nearest location) or application level. Ingress is one of the load balancers for a Kubernetes cluster to route traffic to different pods/services.

AWS services:

Though there is so much to explore and learn in AWS, let me keep this article simple and give you a basic introduction to some of the widely used AWS services.

Note: Most of the AWS services can be accessed through AWS CLI and SDKs.

Elastic Compute Cloud (EC2):

It is one of the building blocks for any application on AWS. It is a virtual computer that is running on servers in AWS data centers. Users can rent these machines and use them for their development, etc. These are cost-optimized (pay-per-use), flexible, scalable, and can run on multiple operating systems. EC2 machines are classified as general-purpose (t3, t2, m4, etc), memory-optimized (X1, R7, R6i, etc), compute-optimized (C4, C5, C6a, etc), storage-optimized (D2, D3, H1, etc), etc. where every type is associated with different computational capacities.

Each EC2 machine is associated with public and private IPs, DNS, storage, operating system (customizable), firewalls (known as security groups), scaling groups, logging and Monitoring (Cloudwatch, an AWS service), IAM Roles, and many more.

Simple Storage Service (S3):

As the name indicates, it is a storage service of AWS. The data is stored as objects (in binary instead of files) with its metadata (created date, size, etc.) in buckets. The bucket is a typical name for a top-level folder on S3. These buckets contain folders, objects, and the names of these buckets should be globally unique. The objects in S3 can be accessed via APIs, storage can be scalable, etc. Some of the S3 types are standard, glacier infrequent access, standard infrequent access, etc.

Route 53:

It is a DNS web service provided by AWS to register domains, route traffic, and perform health checks. We can create DNS records, for the domain we own, like CNAME, MX, TXT, etc. It can also route traffic to other healthy resources in case of DNS-based failures which ensures the high availability of the application to the end user. There are many features such as global traffic management, load balancing, and hybrid cloud connectivity.

Cloudwatch:

It is a monitoring tool that creates dashboards, alarms, events, logs, and different metrics for a given service/application. It monitors various AWS services like EC2, RDS, EKS, etc. where different metrics like storage, CPU utilization, IO, Network, requests, and many more. Alarms can be created to monitor a metric and generate alerts or trigger events based on a configured threshold.

Lambda:

It is a serverless computing platform that runs the code where AWS handles resource allocation and management. Lambda is compatible with programming languages like Java, Python, .Net, etc. These are event-driven and can be triggered from various AWS services like Event Bridge, S3, etc. Lambdas changes to a cold state if not invoked for a configured amount of time. If the application requires the response from a lambda without any delay, it is better to invoke the function using a cron job through AWS Event Bridge, formerly CloudWatch events.

Relational Database Service:

It is a relational database service hosted on cloud servers to ease the provision, scalability, and maintenance of the database by users. It provides several databases like MySQL, Oracle, PostgreSQL, MariaDB, and SQL Server. We can create multiple read-and-write replicas to handle fault tolerances and availability. The underlying infrastructure is fully managed by AWS and the user or database administrator just needs to handle the data, logs(configurable), and security of the service.

References:

  1. https://techprodezza.code.blog/2020/06/01/whats-cloud/
  2. https://aws.amazon.com/
  3. https://aws.amazon.com/about-aws/global-infrastructure/regions_az/
  4. https://aws.amazon.com/ec2/instance-types/
  5. https://aws.amazon.com/s3/storage-classes/
  6. https://aws.amazon.com/route53/
  7. https://aws.amazon.com/cloudwatch/
  8. https://aws.amazon.com/lambda/
  9. https://aws.amazon.com/rds/features/

I will be discussing more on the services and Infrastructure as code (cloud formation or Terraform) in the upcoming articles. Stay updated and keep up the learning. Feel free to reach out or comment to point out something.

Leave a comment