Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using S3 as a database vs. database (e.g. MongoDB)

Due to simple setup and low costs I am considering using AWS S3 bucket instead of a NoSQL database to save simple user settings as a JSON (around 30 documents).

I researched the following disadvantages of not using a database which are not relevant for my use case:

  • Listing of buckets/files will cost you money.
  • No updates - you cannot update a file, just replace it.
  • No indexes.
  • Versioning will cost you $$.
  • No search
  • No transactions
  • No query API (SQL or NoSQL)

Are there any other disavantages of using a S3 bucket instead of a database?

like image 401
Simon Thiel Avatar asked May 13 '19 08:05

Simon Thiel


People also ask

What is the difference between S3 and MongoDB?

Amazon S3 can be classified as a tool in the "Cloud Storage" category, while MongoDB is grouped under "Databases". "Reliable", "Scalable" and "Cheap" are the key factors why developers consider Amazon S3; whereas "Document-oriented storage", "No sql" and "Ease of use" are the primary reasons why MongoDB is favored.

Can I use AWS S3 as a database?

With AWS Database Migration Service (AWS DMS), you can migrate data between SQL, NoSQL, and text-based targets. With Amazon Simple Storage Service (Amazon S3), you can store and protect any amount of data for virtually any use case, such as data lakes, cloud-native applications, and mobile apps.

When should I use S3 instead of database?

S3 provides tools for uploading large objects in parts and migrating big data into storage. AWS S3 is a key-value store, one of the major categories of NoSQL databases used for accumulating voluminous, mutating, unstructured, or semistructured data.

What is the difference between S3 and DynamoDB?

S3 is typically used for storing files like images,logs etc. DynamoDB is a NoSQL database that can be used as a key value (schema less record) store. For simple data storage, S3 is the cheapest service. DynamoDB has the better performance, low cost and higher scalability and availability.


1 Answers

You are "considering using AWS S3 bucket instead of a NoSQL database", but the fact is that Amazon S3 effectively is a NoSQL database.

It is a very large Key-Value store. The Key is the filename, the Value is the contents of the file.

If your needs are simply "Store a value with this key" and "Retrieve a value with this key", then it would work just fine!

In fact, old orders on Amazon.com (more than a year old) are apparently archived to Amazon S3 since they are read-only (no returns, no changes).

While slower than DynamoDB, Amazon S3 certainly costs significantly less for storage!

like image 97
John Rotenstein Avatar answered Oct 12 '22 10:10

John Rotenstein