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?


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!