How to choose AWS Data Store
Tags: aws, cloud, tutorial, linux
Published: 2022-09-26 00:06:58

AWS offers different data store for files, these are used for difference using cases.

- Object Storage, i.e. AWS S3
- Block Storage (POSIX), i.e. EBS, EFS
- And many different database options, such as DynamoDB, AWS Aurora etc


![One Table of AWS Storages Updated in 2024](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yodelwowg1vx1603ufcc.png)



https://dev.to/timhub/how-to-choose-aws-data-store-55e4

In this article, we are focusing on files storage only (S3, EBS, EFS).





## Object Storage - AWS S3

![data](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6br6y04y17m9rmjnskeb.png)

Object Storage it is an "abstract" level to store files, in AWS, it is AWS S3 (Simple Storage Service), there are `bucket` (folder/directory) to store files and folders. It is very similar to Dropbox (actually Dropbox is powered by AWS S3)


### [Pricing](https://aws.amazon.com/s3/pricing/)
The price model is actually simple, users are charged by the storage size, for example in us-east-1, 

- $0.023/GB/Month at the first 50TB
- when store more than 50TB, it is cheaper per GB per month, 
- for infrequent access or glacier archive, it is cheaper

Overall, AWS S3 is **cheap**, comparing all other data/file storage options.


## Block Storage - EBS

![blocks in a bucket](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eo3g4k9xhk0u9nyj11gz.png)


Block Storage in the other hand, it is used as a **POSIX-compliant file system**. AWS EBS and EFS are both POSIX-compliant and can be used to store files.

EBS is required for running an EC2 instance, imagine that AWS Cloud Services as **a local computer components**, EC2 will be the CPU and RAM, EBS will be the Storage Drive. So users cannot share an EBS to different EC2 instances when they are running. To solve this restriction, AWS has another storage option, **EFS.**


### [Price](https://aws.amazon.com/ebs/pricing/)
EBS Price model is a little bit more expensive, instead of charging through the storage size, it charges users through the EBS Volume size. it has [a few different EBS options](https://aws.amazon.com/ebs/pricing/). For example, in us-east-1, the price for GP2 (SSD) is $0.125/GB-Month. (GP3 has a more flexible price model)


## Block Storage - AWS EFS

![files for storage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/up0p0l4aqj7m5761ag1b.png)
Same to EBS, EFS is POSIX-compliant as well, at the same time, it is able to be shared across different EC2 instances. 

EFS offer the capability to share files between different instances. Let's imagine the AWS Services as local computer again, EFS is not EBS as a local storage drive, EFS it will be a **NAT** device in your LAN, all computers are able to visit it, but at the same time, you cannot boot your OS from it.


### [Pricing](https://aws.amazon.com/efs/pricing/)
The price mode is similar to S3, it basically charges users based on the storage users use, but price is the most **expensive** one among S3, EBS, EFS. $0.30/GB-Month



## Simple Comparing Table between AWS S3, EBS and EFS

We have been discussing the limit and the price about these 3 service above, but actually there are more differences.

|  | AWS S3 | AWS EBS | AWS EFS|
|--| --| --| --|
|Storage Limit| Unlimited | 64TB | Unlimited|
|Individual File Limit|5TB|Unlimited|47.9TB|
|Price|0.023|0.125|0.3|
|Shareable|Yes|Not Really|Yes|
|Durability|99.999999999%(Eleven Nines)| 20*Normal HDD Durability|~(No public data)|
|Availability|99.99%|99.99%|~(No public data)|


## How to choose then?


![how to choose AWS data store](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l2k34uvlzyj0g75u7lad.png)

> This diagram is based on price, consistency/scalability factors in the AWS data solutions.

> You can open [the image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l2k34uvlzyj0g75u7lad.png) here in a new tab, if the text are too small.





## References

- [Why dropbox still use AWS S3](https://www.quora.com/Why-does-Dropbox-still-use-Amazon-S3-to-store-data-instead-of-building-its-own-data-center-Is-it-still-cost-effective-for-Dropbox)
- [EBS vs EFS](https://www.justaftermidnight247.com/insights/ebs-efs-and-s3-when-to-use-awss-three-storage-solutions/)


### Other Related Projects/Services
With the popularity of some AWS Service, other cloud provider and open source community, they provide the compatible AWS services as well, especially for AWS S3.

#### AWS S3 Compatible Options
- [minio](https://min.io/) Open source S3 Compatible object storage
- [Cloudflare R2](https://www.cloudflare.com/products/r2/) gives you the freedom to create the multi-cloud architectures you desire with an S3-compatible object storage. 
- [Oracle object storage](https://docs.oracle.com/en-us/iaas/Content/Object/Tasks/s3compatibleapi.htm) Using the Amazon S3 Compatibility API, customers can continue to use their existing Amazon S3 tools (for example, SDK clients) and make minimal changes to their applications to work with Oracle Object Storage.

---

{% embed https://dev.to/timhub %}
[![twitter](https://res.cloudinary.com/practicaldev/image/fetch/s--opAxX3tY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://img.shields.io/badge/Twitter-1DA1F2%3Fstyle%3Dfor-the-badge%26logo%3Dtwitter%26logoColor%3Dwhite)](https://twitter.com/TechTim42)