AWS dynamodb over AWS S3

13,928

Solution 1

AWS Dynamodb and S3 serves different purposes.

Dynamodb - Is good for storing structured or semi-structured data. Its has limits in storage size(Record should be less than 400KB's) but has very high access speeds (Single digit millisecond)

S3 - Is good for storing files. Files could be read over http with its REST API. It allows to store very large files(Up to 5 TB's) with a reasonable access speeds.

For some requirements both services can be used together. e.g. If you need store user profiles with profile image, you can upload the image to S3 and store the link in user profiles table in dynamodb as an attribute.

Solution 2

I have used both Dynamodb and S3. It depends on your application and type of data, if you are going to use that for real time application i would suggest Dynamodb. Latency is good on dynamodb compare to s3 and you can update data based on your key. If you are going to update images or some kind of files you can use s3 and you can save some money with s3.

Solution 3

AWS S3 is object storage capable of storing very large objects upto 5 TB in size. DynamoDB is a NOSQL database that can be used as a key value or a document store.
If you try to use S3 as a key-value store - Listing/Versioning of files will be expensive, you cannot update a file (only replace it), No indexes/search/transactions/query API.
If you try to use DynamoDB as a file directory - size limitation for an item (400KB), read/write throttling.

Solution 4

While I understand, that you want to do CRUD operations (create, read , update and delete) - it is crucial to understand the following factors to decide whether S3 or dynamoDB fits your use-case. [1]Data Structure -> Are you storing objects as whole like documents or tuples of data ? [2]Evolution of Data -> How frequent your data will get updated? [3]Concurrency -> How many concurrent reads or writes at a time? How many clients will be reading and writing the data store? [4]Scalability -> does your use-case involves billions of objects which needs to be retrieved in a sub-second response time ??

AWS S3 is a scalable storage service which not only helps to store the data in a secure & organization way but also helps to manage its lifecycle though other storage classes like IA and glaciers in a cost efficient way.

AWS DynamoDB is a NOSQL storage service, which gives you a high concurrency reads/writes (which you can provision) as per your need and you need to pay only for those reads/writes. With primary & secondary (local or global) indexes, highly distributed cluster pattern can be obtained for sub-second response queries.

In some ways, you can also use both S3 and DynamoDB together by fronting Lambda services distributing your compute requirements across these storage services. Hope it helps!

Share:
13,928
Sumit Gulati
Author by

Sumit Gulati

Updated on June 15, 2022

Comments

  • Sumit Gulati
    Sumit Gulati almost 2 years

    I am new to AWS and need to decide what to choose between AWS dynamo db or AWS S3.

    I have a use case in which I need to fetch multiple items from the data source and update the items and put back to the data source. I have searched and found that we can't perform multiple get in S3.

    Any Suggestions it will be helpful !!