I’ll explain how to use AWS in this series in your business.
Understanding Cloud Computing Benefits
As the title suggests, this series is for non-engineer people, so I’ll not dive into technical details. First, do you know what a cloud provider is? And which benefits does it offer?
According to the AWS website:
“Cloud computing is the on-demand delivery of IT resources over the Internet with pay-as-you-go pricing. Instead of buying, owning, and maintaining physical data centers and servers, you can access technology services, such as computing power, storage, and databases, on an as-needed basis from a cloud provider.”
Well, the definition is pretty simple. Let me give you an example:
You work for “trips.com,” a social media app for trip recommendations. Your team launched the app, and it was a success; thousands of users joined and started to use the app. As your team doesn’t use cloud services, they have to care about storing the images published by the users instead of only caring about the app itself. A few influencers recommended the app one day, giving it unexpected massive access. Since it wasn’t expected, the servers responsible for storing images reached capacity, and the app could not work until new storage servers were added to the data center. It resulted in thousands of users quitting the app and the business losing money.
If “trips.com” were using a cloud provider, they could simply use a storage service like S3(Simple Storage Service) that saves the file and returns a key container to the file location to be retrieved later. In that way, the team could stop spending money on the storage server and focus on the app instead of the physical infrastructure. The cloud provider is responsible for adding more servers to meet the demand. Furthermore, the storage cost would drop a lot since S3 is a cheap service.
This is just a simple example of cloud benefits; there’s a lot more, and I hope to show you in this series.
Why Choose AWS?
Okay, now that you know what a cloud provider is, you’re probably asking: Why AWS?
Well, that’s a very good question, glad you asked.
As mentioned before, AWS has been the market leader since 2007. Having a market share of 32%, against 23% of the second leader, Microsoft Azure. Being the global leader makes it possible for AWS to have the biggest community and professionals around the world and, of course, the best prices.
Besides that, AWS is the most complete cloud provider, offering more than 250 services between them: Compute, Storage, Domain, Database, Monitoring, Logging, Machine Learning Services, Firewalls, etc.
Also, with its global presence, AWS allows your business to create global products in a short timeframe.
Check more at https://aws.amazon.com/pt/what-is-aws/.
AWS Infrastructure
AWS Infrastructure can be divided into 4 main categories: Global, Region, Availability Zone, and Edge Location.
Global
As the name suggests, this is AWS global managed services. An example is Route53, which is used to manage domains. You don’t need to care if some data centers are down. It fails just if the whole AWS infrastructure around the world goes down.
Availability Zone
AZ is the third level of infrastructure, but I prefer to explain it before regions to make it easier to understand. An AZ is a set of data centers geographically close to each other. Each data center has its own dedicated network and power energy supply. An AZ fails when all these data centers fail. Some Services, like EC2(Virtual Machines), run in a specific AZ, and some services can run in multiple AZs.
While I’m writing this post, AWS has launched in 102 Availability Zones.
Region
It is the second level of infrastructure, and it’s basically a set of availability zones allocated geographically. Some services like S3(for storage) run at a region level, meaning the files are stored in multiple availability zones and, consequently, in multiple data centers. AWS creates a minimum of 3 AZs in order to create a Region, and they have the following naming: (country/continent initials)-(cardinal directional)-(count) us-west-2, which is Oregon Region.
While I’m writing this post, AWS has launched in 32 Regions.
Edge Location
It is a special type of infrastructure. Let’s go back to our example from the beginning of the article to make it easier to understand. The app “trips.com” was a success and has users around the world.
The app now uses AWS services; the images are stored in the Oregon Region. César (the author) uses the app and accesses it from Brazil. It takes a lot of time before he sees posted images because the images must be fetched in Oregon servers.
Edge Locations solves this problem by having a point of presence around the world. Some services, like CloudFront, use these points of presence to save images globally, close to the end user, so when César opens the app, instead of going to Oregon, the app will get the image in São Paulo, which is closest to him.
I called Edge Location a special type of infrastructure because, while a region and AZs support more than 250 services, Edge Locations supports just a few services with a specific purpose.
While I’m writing this post, AWS has more than 550 points of presence around the world.
This is the basic AWS infrastructure. There are a few special types, but I’ll not cover them in this series. You can see more about AWS Infrastructure here: https://aws.amazon.com/about-aws/global-infrastructure/
An observation: I mentioned that data centers/AZ/Regions can go down, but that doesn’t mean that this happens. It’s rare to see an AZ/Region outage. AWS offers SLA (Service Level Agreement) for all its services. The lowest SLA is 99.5% of uptime (can be down for 1 day 19 hours 48 minutes during the year), and most services have 99.9% of uptime (8 hours 45 minutes 36 seconds during the year). Again, just because it can happen doesn’t mean it will happen.
Before we finish this first part, we need to understand a few more important concepts for cloud services.
High Availability
HA is the ability of your applications to run continually even if some parts of it fail, e.g., compute servers. Remember when I mentioned that EC2 runs in a single AZ? If the AZ or the EC2 hardware fails, your server goes down, and your app stops working. So, instead of launching just one EC2 instance, you can launch 1 instance per AZ. If something happens with one instance, the other instances can handle the workload. S3 is an example of a highly available service by default. It replicates the file with 3 AZs, so even if an AZ goes down, there are 2 more AZs of guarantee.
HA is a special and sensitive topic that should be discussed carefully. It is always good to think about it, but you must know that it has a main trade-off called money. In the above example, instead of launching 1 instance, we’re launching 3 instances, spending 3x more money. Is it worth spending more money to ensure that the servers run? I think it is for this example, but depending on the scenario and your service, it couldn’t be worth it.
Let’s have a second example. S3 has a special storage type called One-Zone AI that saves the file in just one AZ. It is way cheaper than the standard storage type that replicates to 3 AZ, but if the AZ fails, all the files will be lost. In some scenarios where files can be easily recreated, that may not be a problem.
In summary, HA is very important to have in mind, but you have to balance if it’s worth it for every scenario.
Shared Responsibility Model
AWS uses Shared Responsibility to its customers. It’s a pretty simple model, but it can be different for each service. This model divides responsibility into two forms: “in the cloud” and “of the cloud.”
Of the Cloud
It’s AWS’s responsibility to maintain the security of the cloud. This means that you don’t need to care about energy power down, storage running out of space, hardware failure, etc. AWS will manage it; you care about your application.
In the Cloud
Okay, it’s AWS’s responsibility to maintain the cloud working, but the security in the cloud is your responsibility. For example, if you don’t encrypt and protect sensitive reports about your company and these reports are leaked somehow, it’s your fault and not that of AWS.
Responsibilities can change depending on the service, e.g.:
- EC2(Virtual Machine), the customer is responsible for managing operating system patches and updates.
- Fargate (another type of computing service), you’re not responsible for that anymore.
You can check more about this here: https://aws.amazon.com/compliance/shared-responsibility-model/
Pricing Model
AWS offers you a pay-as-you-go pricing approach for most cloud services. That means you only pay for what you consume. E.g., Your team launches a virtual machine to perform a task that takes 1 hour to finish, and after that, the virtual machine is terminated. In AWS, you’ll only pay for the 1 hour of usage.
Besides pay-as-you-go, AWS provides the “pay less by using more,” which means that the more you use a service, the cheaper it becomes. For example, S3 standard pricing charges 0.023 USD/GB for the first 50TB of storage. After you pass 50TB of storage, the price decreases to 0,022USD/GB.
AWS also has a Free-Tier pricing model for most of the services. The free tier is available in 3 formats:
- Always Free – For example, DynamoDB (database) first 25GB of storage is free. You’ll never pay for the service if you don’t use more than 25GB.
- 12 Months Free – When you create an account, you have 12 months of free usage for some services.
- Trial – AWS SageMaker(for machine learning) is an example of a trial. Once you start to use the service, you have 2 months of free trial.
AWS also offers Saving Plans and Reserved Instances. It’s similar to “pay less by using more,” but you commit with AWS to use a service for X time, and then you get big discounts. Reserved Instances are offered to EC2 service, and you can give up to 72% of discount.
As you can see, AWS offers a lot of benefits when dealing with pricing. This could save a lot of money for your business if correctly used.
Wrapping Up
Well, that’s the basics that I wanted to cover in this first part, I hope you enjoyed it and understand the benefits of using AWS. Below, you can check the next steps of the series.
Quick series overview
I’ll be covering some topics in this series:
- IAM — Identity access management — Used to grant access to AWS accounts and services.
- Networking — VPC, Route53, CloudFront.
- Computing — EC2, Load Balancer, API Gateway, Lambda, ECS.
- Databases — RDS, Aurora, DynamoDB, RedShift.
Don’t worry, I’ll try to keep it as simple as possible for you to understand. See you in the next part.
A friendly advice: Avoid the us-east-1(N. Virginia Region) region as much as possible. It’s the oldest and biggest region. It’s the base for most global services and AWS applications, such as AWS Training and AWS Skill Builder. Because of that, the region has most of the outages and problems. I highly recommend using the us-west-2 (Oregon) region.