EBS, EFS and S3 – when to use AWS’ three storage solutions

by Ned Hallett
Published on September 2020

AWS offers a range of storage solutions, but for many users with typical storage needs, the decision comes down to these three services: EBS, EFS and S3. 

The question is, which one? 

It all comes down to your use case, but the good news is that these three services are generally different enough from each other that, once you’ve established your needs, and you understand what situations each one is most suited to, picking one over the other is easy. 

And the even better news is that we’ve written up all you need to make that decision below.

 

1. EBS: high performance, per instance block storage 

 

EBS Logo

EBS is the only one of these three which is not accessible  to multiple EC2 instances. This is because EBS is really much more like a hard drive in a traditional computer.

Each EBS instance is paired with a VM which it acts as the storage instance for.

Exactly like your desktop and it’s own physical hard drive. 

What kind of storage is EBS?

EBS is a block storage service, which means all data within EBS is stored in equally sized blocks. This system offers some performance advantages over traditional storage, and can generally offer lower latency.

What are EBS’s key benefits?

Within its role as a per-EC2 instance service, EBS has a range of benefits.

  • Low-latency performance – EBS boasts 4000 I/0 actions, making it high performance
  • Easy data backup and restoration – via point-in-time volume snapshots, EBS ensures your data is well protected.
  • Highly available – at 99.99% availability.
  • With EBS encryption, there’s no need to worry about key management, as EBS handles that for you.

When to use EBS

EBS’s usecase is more easily understood than the other two services discussed. It must be paired with an EC2 instance. So when you need a high-performance storage service for a single instance, use EBS.


2. EFS: scalable file storage for multiple EC2 instances

 

EFS logo

Unlike EBS, EFS can be mounted by multiple EC2 instances, meaning many virtual machines may store files within an EFS instance. 

But it’s main feature is its scalability. EFS can grow or shrink according to demand, with more and more files being added without disturbing your application or having to provision new infrastructure.

What kind of storage is EFS

EFS is a file storage system. File storage is the system you’ll likely be most familiar with, as it’s how files are stored in the hard drive on your computer. File storage is fast and accessible, but it doesn’t offer the increased potential for complex queries that object storage does (more on that in the S3 section).

EBS’s key benefits 

Within its role as a shared file storage service for multiple EC2 instances, EFS provides many benefits: 

  • Adaptive throughput – EFS’s performance can scale in-line with its storage, operating at a higher throughput for sudden, high-volume file dumps – reaching up to 500,000 IOPS or 10 GB per second.
  • Totally elastic – once you’ve spun up an EFS instance, you can add add files without worrying about provisioning or disturbing your application’s performance.
  • Additional accessibility – EFS can be mounted from different EC2 instances, but it can also cross the AWS region boundary via the use of VPC peering.

When to use EFS

EFS may be used whenever you need a shared file storage option for multiple EC2 instances with automatic, high-performance scaling. 

This makes it a great candidate for file storage for content management systems; for lift and shift operations, as it’s autoscaling potential means you do not need to re-architect; for application development, as EFS’s shareable file storage is ideal for storing code and media files.


3. S3: object storage for complex queries and archived data 

S3 logo

S3 is scalable, like EFS, and has access to multiple EC2 instances. However, it can also be accessed by other cloud services, and it’s object storage system makes it ideal for handling large volumes of static data as well as complex queries.

What kind of storage is S3

 

S3 is an object storage service. Unlike file storage – in which all data is organised hierarchically in a top-down network of folders – data in S3 is contained on the same flat plane, with more comprehensive meta data (labels) to make it manageable.

Think of the difference between a family tree, and a family party, at which each family member is wearing a name tag with all their familial relations written on it. 

Having each object marked up with all its information makes it easier to run complex queries about each object without reference to an existing hierarchy.

What are some of S3’s benefits 

Within its role as a object storage system, S3 offers many benefits:

  • Running analytics – because S3 can interface with other services like AWS Lake Formation and analytics tools, it can be used as a data lake, with other services running complex queries on its data to draw insights.
  • Data archiving – S3 is capable of archiving data, meaning simpler forms of your data – capable of recalling the whole file if needed – can be stored at a lower cost than readily accessible data.
  • Highly available – S3 boats 99.99% + availability.
  • S3 can be mounted on an application to act as a shared drive, making files shareable across multiple instances running the web application.

When to use S3

S3 is good at storing long-term data due to it’s archiving system. Things like reports and records, which may not be used for years, can be stored on S3 at a lower cost than the other two storage services discussed here. 

As already stated, S3 is also useful for storing data on which complex queries may be run, this makes it useful for data related to customer purchases, behavior or profiles, because that data can be easily queried and fed into analytics tools.

This  capacity for interfacing with other tools also makes S3 great for back-up and restoration, as it can be paired with Amazon Glacier for even more secure backing up.

S3 also supports static websites, so if you need to host a static html page, S3 is a good choice.

The Takeaways 

  • EBS is a high-performance per-instance block storage system designed to act as storage for a single EC2 instance.
  • EFS is a highly scalable file storage system designed to provide flexible storage for multiple EC2 instances.
  • S3 is a more complex object storage system, designed to provide archiving and data control options and to interface with other services beyond EC2. It’s also useful for storing static html pages and shared storage for applications.
SHARE