AWS S3 vs EBS vs EFS 🤔: A case study

Haard PatelHaard Patel
4 min read

AWS is the ocean. There are many different types of services to fulfil the IT need on cloud. When it comes to "Storage" there are many services in AWS which provides the storage capacity. It is very confusing to choose when you want to select the storage service. Don't worry this blog will solve your confusion.

First of all we will introduce three important storage services and then we will see the factos we can consider to choose the most suitable option.

  • S3 (Simple Storage Service):

    • Object storage.

    • Files are broken down into objects asnd stored independently, making them ideal for large datasets, backups, and static content.

  • EBS (Elastic Block Storage):

    • Block storage.

    • Provides persistent block-level storage volumes that behave like traditional hard drives attached to EC2 instances. Ideal for frequently accessed databases and applications.

  • EFS (Elastic File system):

    • File storage.

    • Offers scalable file storage for EC2 instances and on-premises servers, allowing multiple instances to share files simultaneously. Perfect for collaborative applications and shared data sets.

What are the factors we can consider to choose the storage service ?

Below are the list of factors we can consider which can help in choosing the most appropriate storage service.

  1. Frequency of access

    • In some use cases we need the data to be accessed very frequently then EBS is good choice while if our data is accessed occasionaly then S3 is good choice and it will be very cost effective.

    • For example, if we want to have Data Lakes and we want to perform the Data Analytics in which frequency of access is not much then S3 is perfect choice for that

    • Is our data is required to be shared across all the instances in sync then EFS is good choice

  2. Accessibility:

    • S3: Highly accessible from anywhere on the internet with public or private access control.

    • EBS: Only accessible from the attached EC2 instance.

    • EFS: Accessible from multiple EC2 instances and on-premises servers

  3. Scalability:

    • S3: Highly scalable and elastic, can grow or shrink automatically based on your needs.

    • EBS: Scalable by attaching additional volumes to EC2 instances, but not as automatic as S3.

    • EFS: Highly scalable and can be shared across multiple instances.

  4. Performance:

    • S3: Lower latency for reads compared to writes, good for infrequent access to large files.

    • EBS: High IOPS and throughput for attached EC2 instances, ideal for performance-intensive applications.

    • EFS: Lower performance than EBS for individual instances, but good for shared access with consistent performance across users.

  5. Cost:

    • S3: Generally the cheapest option, with pay-per-use pricing for storage and requests.

    • EBS: More expensive than S3, with costs based on volume size, IOPS, and throughput.

    • EFS: Most expensive option, with costs based on file system size and throughput.

  6. Use Cases:

    • S3: Ideal for backups, archives, static websites, media libraries, and big data analytics.

    • EBS: Perfect for boot volumes for EC2 instances, databases, and applications requiring high performance.

    • EFS: Suitable for shared data sets, collaborative applications, content management systems, and web applications.

  7. (IMP) Application type:

    • Some applications require storage to be accessible to people in different geo-location globally then EFS is benificial like serving Web servers, doing content management etc..

    • If our application have large size videos being stored then S3 is good choice because it is object storage so there will be dedicated endpoint of each video which can be accessed easily

    • some application requires separate instances for separate routes and sometime we require some data like login info to be cached so that everytime user will not have to enter details. Simillarly, a user can get the list of items in cart on E-commerce website running on AWS even a customer login after few minutes. In this kind of scenario EBS is the best choice.

By understanding the strengths and weaknesses of each service, you can make an informed decision about which one is right for your AWS storage needs. I hope this comparative analysis helps!

If you want to discuss similar topics then you can reach out to me via linkedin. I will definitely help.

Thank You

2
Subscribe to my newsletter

Read articles from Haard Patel directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Haard Patel
Haard Patel

Hello, I am a Graduate student who aspires to become Software Developer. I love to share the knowledge and help the community.