DEV Community

Cup of Code
Cup of Code

Posted on • Updated on • Originally published at cupofcode.blog

Introduction to AWS: Cloud Computing and Global Infrastructure

Want to get into the AWS world? This is where you should start!

cupofcode_blog_main_picture

Introduction

Before we start, I need to say it loud and clear: I work for Amazon, but I have nothing to do with the AWS teams. I am a client of AWS services just like you, and I struggled to understand this wondrous world as well.

When I decided to start learning about it, I didn't know what to focus on, or where to start tackling this huge monster. After watching dozens of videos and gaining some work experience, things started to click. In the upcoming blog posts, I’ll share my notes. (Well, if you’ve been visiting my blog for a while, you might have observed that I find it hard to actually publish those promised sequel blog posts in a timely fashion, but this time I’m hopeful!)

This content is aimed towards passing the AWS Cloud Practitioner Certification exam. One of the courses I took recommended reading the official AWS white papers, but it’s too many pages so fuck no. Here are the links if you do decide to do so: AWS Well-Architected Framework, Overview of Amazon Web Services 

What Are We Going To Talk About Today?

  1. Cloud Computing: What is it, advantages, and types
  2. AWS Global Infrastructure: Regions, Availability Zones and Edge locations

Shall we begin?


Let’s Start From The Beginning

What is AWS?

Amazon Web Services (AWS) is a subsidiary of Amazon providing on-demand cloud computing platforms and APIs to individuals, companies, and governments, on a metered pay-as-you-go basis. — Wikipedia

Ok, so from here we learned that AWS is owned by Amazon and provides a pay-as-you-go on-demand cloud computing service. Cool.

What is Cloud Computing?

Cloud computing is the on-demand availability of computer system resources, especially data storage and computing power, without direct active management by the user. — Wikipedia

Cloud computing is basically renting someone else’s computer for storage or compute power. It’s like when you rent an apartment and if suddenly the shower needs a fix — you are not the one taking care of it.

cupofcode_blog_not_the_cloud

cupofcode_blog_the_cloud

So this is the cloud. But hey, even if I need extra computers, why should I rent instead of buying?

6 Advantages of Cloud Computing:

1. Trade capital expense for variable expense: Capital expenditures (CAPEX) are a company’s major, long-term expenses while operating expenses (OPEX) are a company’s day-to-day expenses. 

Let’s say your company needs 200 servers for usual daily traffic and another 100 for special occasions like the holiday season. Renting 300 servers in a 3-year contract used to be the only way to manage that load and it is considered a capital expense. Adding 100 servers just for prime-day, on the other hand — is an operating expense, and way cheaper.

With the variable expense, you can do trial and error in small amounts, without years-long contracts — no commitment!

2. Benefit from massive economies of scale: AWS, being a huge corporate, has better purchasing power. 

In a previous blog post, I shared with you that I used to work at McDonald’s when I was a teenager. Be sure that McDonald’s purchases potatoes at a much cheaper cost than you get from the grocery store, no matter where you decide to do your shopping. 

Because of that, AWS is able to sell you services cheaper than you can get yourself. 

3. Stop guessing capacity: This one looks similar to the first advantage, but it’s from a different perspective, the first one was financial, and this one is what I call human computing-power ;) 

You can save all the meetings and experts to try to calculate what’s the precise amount of servers to both satisfy big traffic and also not be wasted on regular traffic days.

Got 5 servers but need 6? Just add another one. Found out after a month you don’t need the 6th? Remove it — both actions happen within minutes.

Meme break!
cupofcode_blog_meme_2

4. Increase agility: You can Increase your application’s speed by adding resources, like the number of servers, or locations, like spreading your servers in different regions in the world. In both actions, adding new IT resources is only a click away. 

5. Stop maintaining data centers: Adding on-premise (on-site) resources is a waste of money and time. Cloud computing gives you the ability to focus on your customers and stop managing infrastructure. 

In our McDonald’s example, let’s say one of the cashiers broke. If McDonald’s were managing their computers themselves, the shift manager would have to get it fixed, but because they have a third-party provider — they don’t need to waste time. This company will send someone knowledgeable to fix it or replace it.

6. Go global in minutes: AWS (or another worldwide cloud services provider) gives you the ability to deploy in multiple regions around the world. The ability to deploy around the world gives lower latency and a better user experience at a minimal cost. 

Why exactly do multiple regions provide a better experience, you wonder? We’ll touch on it when we get familiar with AWS CloudFront and CDN.

Here is a short summary of the cloud computing advantages:

cupofcode_blog_cloud_computing

Types of Cloud Computing

In this section we will learn about cloud computing models and cloud computing deployment models.

3 Cloud Computing Models:

Software as a Service (SaaS): It’s what you use when you choose to use the cloud. For example — Gmail. All you do is manage the inbox, and Google takes care of the data centers, servers, networks, storage, maintenance, patching, etc. all you worry about is the software itself and how you want to use it. I couldn’t find an example for an AWS service that is a SaaS, so I assume there isn’t (yet).

Platform as a Service (PaaS): It’s what you build on top of when you use the cloud. Someone else is managing the underlying hardware and operating system (security patching, update, maintenance). You just focus on your applications.

Real-life example: Heroku! It’s a platform where you upload your project and they store and run it. You receive a URL (or buy your own and attach) and you have your website.

An AWS example for PaaS is elastic beanstalk. We will meet that service in future blog posts.

Infrastructure as a Service (IaaS): It’s what you migrate to when you choose to use the cloud. You manage the server which can be physical or virtual and the data center provider will have no access to your server. 

A real-life example is a hospital building: the floors, the rooms, the elevator… these are not medical but essential for the operations. 

An AWS example for IaaS is EC2. It’s a virtual server and we will talk about it soon.

Here is a diagram that summarizes it all:

cupofcode_blog_IaaS_PaaS_SaaS

  • At the bottom part of each triangle, you can see the areas each service is managing. 
  • On the right side, it says which type of person is the user of each service type.
  • On the left side, you can see an example of a well-known service in each category.

In the beginning, I thought IaaS, PaaS, and SaaS are built on top of each other, but that’s not the case. That is why in the diagram above I emphasize that each layer manages all the responsibilities of the layers inside as well. 

Lastly, there are three models of cloud computing deployment:

  • Public cloud — AWS, Azure, GCP (Google Cloud Platform)
  • Private Cloud (on-premise) — You manage it, in your data center.
  • Hybrid — Mixture of public and private, for example, website on public cloud, employee info on private cloud with no external access.

AWS Global Infrastructure

According to their website, AWS has 80 Availability Zones across 25 geographic regions.

A Region is a geographic area in the world and each region has multiple (at least 2), isolated locations known as Availability Zones.

An Availability Zone (AZ) consists of one or more discrete data centers (data centers are buildings filled with servers). Each AZ with redundant power, networking, and connectivity, housed in separate facilities.

To clarify, an AZ can be several data centers but they are so close, and share resources, that they are counted as 1 AZ.

aws_global_infrastructure

The diagram above introduces us to the four terms: Server, Datacenter, AZ, and region. I added electricity elements to emphasize that the data centers share resources.

Regions in AWS are marked with country-direction-number , for example: us-east-1, us-west-2. The AZs inside the regions are marked with an additional letter: us-east-1a, us-east-1b, us-east-1c

Besides regions and AZs, AWS has another type of infrastructure: Edge locations.

Edge locations are the endpoints for AWS which are used for caching content.

An edge location is the nearest point to the consumer (user) who is consuming the AWS service. In these locations, the server is not present but a small setup is there. Typically this consists of CloudFront, Amazon’s content delivery network (CDN), which we’ll talk about more in the future. 

Both the Edge Locations and Availability Zones (AZ) are AWS Data Centers, but Edge Locations are primarily used for caching of the data to provide a better user experience with low latency, the AZ is used for hosting servers, websites, applications, software, Big Data processing, analytics and a wide variety of use cases.

Because of that, there are many more edge locations than regions:
# of edge locations > # of AZs > # of regions

Available Regions

There are three types of AWS accounts, and your account determines the Regions that are available to you.

  • An AWS account provides multiple Regions so that you can launch Amazon EC2 instances in locations that meet your requirements. For example, you might want to launch instances in Europe to be closer to your European customers or to meet legal requirements.
  • An AWS GovCloud (US-West) account provides access to the AWS GovCloud (US-West) Region and the AWS GovCloud (US-East) Region. GovCloud: can be used by the US federal government and private companies. It's operated by US employees on US soil, for US entities only.
  • An Amazon AWS (China) account provides access to the Beijing and Ningxia Regions only. For more information, see AWS in China.

How Do I Choose The Right AWS Region?

Does it even matter where I run my service? YES, it does! For multiple reasons:

  • Data Sovereignty laws: Data sovereignty is the idea that data are subject to the laws and governance structures within the nation it is collected. Some countries want their data to stay within their country, so you might be limited by geographic location.
  • Latency end-users: Where is the majority of your end-users? These days, people will close the tab after less than 5 seconds of no response.
  • AWS services: Not all regions provide the same services! Note that us-east-1 always has the most services, because it is the primary region where everything is released.

That’s it for today! Not so scary, ah? Today we learned about cloud computing and AWS global infrastructure. In the next blog post, we will start diving into basic AWS services, and learn about IAM, S3, and Cloudfront! 

I hope you enjoyed reading this article and learned something new! Want to learn more? Click here and read about Yak Shaving – a developer’s nightmare!

If you read this, you've reached the end of the blog post, and I would love to hear your thoughts! Was I helpful? Do you also use AWS at work? Here are the ways to contact me:

Facebook: https://www.facebook.com/cupofcode.blog/

Instagram: https://www.instagram.com/cupofcode.blog/

Email: cupofcode.blog@gmail.com
cupofcode_blog_cover_photo

Top comments (0)