Cynthia Mwihaki Kamau
Cyber Cyndie.

Cyber Cyndie.

AWS Storage Types; S3, EBS & EFS And How To Differentiate Them!

AWS Storage Types; S3, EBS & EFS And How To Differentiate Them!

AWS Storage is made up of three classes; object, block and file storage. In this post we'll learn how to differentiate the three.

Cynthia Mwihaki Kamau's photo
Cynthia Mwihaki Kamau
ยทJul 16, 2022ยท

9 min read

Table of contents

Heeeeeyyyy guys!!!! ๐Ÿค—๐Ÿค—๐Ÿค—๐Ÿค— It's been a loong loong time! So I went on I think a two months' hiatus and didn't post much, but I'm back now!

happydog.png

Damn I really had missed writing! I just didn't have the energy for it for a while. But I'm back to the game now! ๐Ÿฅณ๐Ÿฅณ๐Ÿฅณ
Now as I was planning out my future posts, I realized I didn't quite finish talking about AWS services. So without further ado, let's talk about AWS Storage.

Now AWS has 3 main categories of storage:

  • Object Storage (S3)
  • Block Storage (EBS)
  • File Storage (EFS)


We are going to discuss each type of storage with regards to;

  • Architecture
  • Use Cases
  • Availability and durability
  • Costs

a. Object Storage (Amazon Simple Storage Service)

Now What is S3? So in order to fully differentiate these storage types, I'm going to use an analogy to explain them. duuh I live for analogies! Imagine I'm a writer, writing my book on zombie apocalypse!!

zombie.png


Now previously, I used to store my manuscripts locally on my laptop, until I got robbed on my way home and lost everything! This led me to store my work on AWS! (After starting from scratch.... again! If you have never lost your work you've never experienced true heartbreak!!)

angryGirl.png
So we have our file, 'zombieworks.txt' . I decide to use S3 as my storage option. With object storage, S3 will simply place my file as it is; 'zombieworks.txt' . It will be placed as an object in the bucket. It's just like collecting balls and storing them in a bucket. I will now be accessing my manuscript over the internet, through a link.


Now imagine I want to add a new chapter to my manuscript. With S3, I now have to retrieve the whole file, work on it, then re-upload it. Just like taking a ball from the bucket, using it, then returning it back to the bucket. Meaning if I get a new idea in the middle of the night, instead of just working on a specific area, I now have to download the whole document. Not quite optimal if I'm gonna be working on it frequently, yes? That's where block storage steps in.

b. Block Storage (Amazon Elastic Block Storage)


With block storage, EBS now takes our manuscript, 'zombieworks.txt', and divides it up to smaller portions called blocks. let's say chapter 1, 2,3 etc. These blocks are then assigned a unique number for identification, then I'm given a key, which is like a roadmap to know which block has what.

So if today I'm working on say chapter 1, I'll just take out the chapter 1 block, make changes, and they automatically update to the block! So no need to re-upload. Cool right? That's what block storage means.


So as I continue working on my story, let's say I'm adding some collaborators to help me on the story plot, my friends are reviewing the story and making some changes, I've already started having a fan base, my manuscript will now have to be accessed by many people at the same time, yes? That's where file storage butts in.

c. File Storage (Amazon Elastic File Storage)

With EFS, data is now stored as files. What's better, it's a shared file system. Meaning our manuscript can now be shared across several people in different locations at the same time! Without now having to manually share it to them individually.


So with that analogy in mind, let's get back to the 3 main storage options; S3, EBS and EFS.

1. Architecture

- Amazon S3

s3.png Image from cloudonaut.


As described above, S3 is a simple object storage service. It's made up of different types of buckets described in detail here.


With S3, they are available in regions, example say Northern Virginia region, Tokyo region etc. But they are globally accessed anywhere! This is because they are accessed over the internet. Meaning I can decide to store my data in a bucket in China, but so long as I have a link to the data, I can access it anywhere.

- Amazon EBS

aws_ebs.png Image from OodlesTechnologies.


Now with EBS, one important thing to note is that they have really high performance, but they are attached to the EC2 machines. It's just like a computer's hard disk. You can't really use it without a computer, yes? They are therefore restricted.

- Amazon EFS

aws_efs.png Image from Suraj Jadhav.


With EFS, it is usually needed when several EC2 machines have been fired up, say 10-1,000 , and they need a connected storage system so they can mutually gain access to the data stored.

Think of it this way; we have two EC2 machines. Each machine has it's own EBS storage. One day, the first machine needs the data stored in the second machine, but the EBS volumes are not connected. With EFS, instead of each machine having its own storage, it acts like a storage pool. So all these machines can access data from each other.

2. Use Cases

- Amazon S3


Because it's a simple storage system which is accessible over the internet, some of its use cases include;

  • Storing videos, images
  • Hosting static websites
  • Creating backups and archives


A company like Netflix would greatly benefit from S3, since all their movies could be stored there, and only retrieved when Cyndie wants to watch marvel! We'll also discuss why they are great for backups on availability and durability.

- Amazon EBS


Because of it's low latency, EBS is great for any workload which requires frequent access with really low downtime. An example would be;

  • Hosting an OS (Operating System) and its database.


So say you want to run Linux on your computer virtually, and you fire up a Linux virtual machine using AWS, EBS would be the storage option for you.

- Amazon EFS


As earlier explained, EFS is a great option when say you have 50 Linux virtual machines running, so instead of having 50 EBS volumes you have one storage pool. It's therefore great for;

  • Shared files access
  • Big data analytics
  • Huge workflows
  • Container storage (Kubernetes for eg uses EFS). You can learn more about containers here.

N.B: With EFS, there's a specific file system for Windows, known as Amazon FSx for Windows. You can learn more about FSx here.

3. Availability and Durability


With availability, this means that the systems are operating so you get your requests on time. So nothing is lagging or 'hanging'.

With durability, think of long-term storage. What you've stored can go for 10 years without getting corrupted or lost.

With that in mind, let's go through our 3 storage types.

- Amazon S3

s3availabilityTable.jpg image from UnixArena.


As you can see, S3 has 99.999999999% (11 9's) durability! Meaning if say you stored 10 million objects in S3, the probability of losing a single object is once in 10,000 years! This is why S3 is the best when it comes to backups and long-term storage.


As for availability, S3 is 99.99% . Compared to its durability, it's availability is on a lower scale. This is why it's not advisable to store data needed frequently and urgently on S3. But for long-term storage, it's the best!

- Amazon EBS


EBS has an availability of 99.999%, which makes it best for critical workloads which require very low downtime. As for durability, it ranges between 99.8 to 99.9% depending on the type of EBS volume used, therefore it's not advisable for long term storage.


EBS is therefore great for running critical applications which need really low downtime, but it's not great for long-term storage.

- Amazon EFS


Like S3, EFS has 11 9's durability scale. It is highly available within an AWS region. The best practice with EFS, would be to create backups within different AWS Availability Zones, so you know, just in case a whole zone goes up in flames!! ๐Ÿ˜‚๐Ÿ˜‚

Otherwise, EFS has the same performance metrics as S3.

4. Costs

Finally, let's top off with Costs!

- Amazon S3

s3pricing.png Image from AWS Documentation


S3 is the cheapest storage cost, with a pay-as-you-go model. Meaning you pay for only what you use.


The prices also vary depending on the type of storage one needs. Example, for long term storage, an S3 storage class known as S3 Glacier would be more appropriate.

- Amazon EBS

AWS EBS pricing Image from AWS Documentation.


So EBS is a more expensive option as compared to S3. Something to note here is that with EBS, you pay for provisioned capacity. Meaning if you provision a volume of 5 TB to your machine, even if you use 2 TB, you'll still pay for the 5 TB. Also, like S3, the pricing also depends on the type of storage volume. You can learn more about EBS volumes here.

- Amazon EFS

AWS EFS Pricing Image from AWS Documentation

Now EFS might be the most expensive of the three, but it can be more cost-efficient compared to EBS, since it serves multiple EC2 instances at once. So instead of paying for say 50 EBS volumes, you just pay for an EFS with a higher capacity. You can learn more about EFS here.


With that, let's top off with a lovely decision tree I came across the internet! It is used to show which factors to consider when choosing a storage option for your business, to help choose the most appropriate solution!.
AWS Storage Decision Tree.png

I got it from AWS Training Center. It's just to show how to choose a service appropriate for your needs, by making a decision tree.


BTW!! Imagine you are using all these services, and you need to create backups of everything, and manage them. With AWS Backup, you can create a centralized backup system, so you manage all your backups in a central position, instead of having to manage separate backups. Pretty cool right? ๐Ÿ˜๐Ÿ˜


And once again, a friendly reminder:

Always Backup Your Data! To avoid heartbreak and other short stories ๐Ÿ’”.



See yah around the block! I'll be delving deeper into the storage options one by one. It's time I know create a mini series! See you soon. Who knows? I'll prolly be done with that zombie apocalypse book by then! Adios ๐Ÿ˜š๐Ÿ˜š.

casual-life-3d-excited-young-woman-receiving-like-notifications-on-her-laptop.png

ย 
Share this