Ethan Goldberg
Ethan Goldberg

Reputation: 89

AWS S3 vs. MongoDB

I am making a python script that runs in an infinite loop updating a JSON-formatted object (this JSON is then queried by my iOS application through the keys). I am trying to figure out how to store this information on the server-side. I want to use Amazon EC2 for running the script but am torn between the storage. I looked into MongoDB, which I really like because of the JSON-like storage format, but also have looked into Amazon S3. I am wondering, in particular, a couple of things: 1. Is Amazon S3 effective in storing JSON-objects which can be queried efficiently every second (like MongoDB), or mostly .html files? 2. If I am using Amazon S3, does MongoDB cost money? Or, does anyone know of any better non-relational storage I should be using? Thank you!

Upvotes: 2

Views: 6390

Answers (1)

Ashan
Ashan

Reputation: 19738

For the particular usecase Amazon S3 doesn't fit in since every second you have to retrieve the file, modify to do a change and save. In addition querying by individual items in the file is also not directly possible.

Instead consider using a NoSQL database like AWS DynamoDB or MongoDB.

The advantage with DynamoDB is that its a fully managed solution in AWS and for a simple table it might me cost effective with the free tier. However, MongoDB is better at querying but you have to setup your own DB cluster which would add a significant cost or use a hosted solution like MLab.

Upvotes: 6

Related Questions