Need advice about which tool to choose?Ask the StackShare community!
Amazon DynamoDB vs Amazon S3: What are the differences?
Introduction
Amazon DynamoDB and Amazon S3 are both storage services provided by Amazon Web Services (AWS). However, there are key differences between these two services in terms of their use cases, data structure, data access patterns, scalability, and pricing.
Use Cases: Amazon DynamoDB is a NoSQL database service that is ideal for applications requiring low-latency data retrieval and high scalability. It is well-suited for use cases such as real-time bidding, gaming leaderboards, and user profiles. On the other hand, Amazon S3 is an object storage service designed for storing and retrieving large amounts of data. It is commonly used for backup and restore, data archiving, and content distribution.
Data Structure: DynamoDB stores data in a key-value format, where each item contains a primary key and one or more attribute values. It allows for flexible schema design and can handle both structured and unstructured data. In contrast, S3 is an object storage system that organizes data into buckets and objects. Each object is identified by a unique key (URL) and can contain any amount of data.
Data Access Patterns: DynamoDB provides fast and predictable performance, with millisecond latency for both read and write operations. It supports both single-item and batch operations, as well as advanced features like conditional writes and transactions. S3, on the other hand, offers eventual consistency for read operations, which means that changes may take some time to propagate across all regions. It is optimized for write-once, read-many (WORM) scenarios and is not suitable for real-time data updates.
Scalability: DynamoDB is designed to scale horizontally and can handle millions of requests per second. It provides automatic partitioning and replication of data across multiple servers and data centers. S3, on the other hand, automatically scales to support the storage needs of applications. It can store virtually unlimited amounts of data and has a durable design that protects against data loss.
Pricing: DynamoDB pricing is based on throughput capacity (provisioned or on-demand) and storage used. It offers flexible pricing options and allows for cost optimization based on application needs. S3 pricing is based on the amount of data stored, data transfer, and API requests. It also offers various storage classes (e.g., Standard, Intelligent-Tiering, Glacier) with different price points based on data access frequency.
Data Retrieval: DynamoDB allows for querying and scanning data based on the primary key or secondary indexes. It supports both single-item and range queries, and provides advanced filtering capabilities. S3, on the other hand, primarily supports object retrieval based on the unique key (URL) of the object. Although it offers features like bucket policies and access control lists (ACLs) to manage access to objects, it does not provide complex querying capabilities like DynamoDB.
In Summary, Amazon DynamoDB is a highly scalable NoSQL database service, optimized for low-latency data retrieval, and offers flexible schema design. Amazon S3, on the other hand, is an object storage service suitable for storing and retrieving large amounts of data, with a focus on durability and simplicity of data access.
We offer our customer HIPAA compliant storage. After analyzing the market, we decided to go with Google Storage. The Nodejs API is ok, still not ES6 and can be very confusing to use. For each new customer, we created a different bucket so they can have individual data and not have to worry about data loss. After 1000+ customers we started seeing many problems with the creation of new buckets, with saving or retrieving a new file. Many false positive: the Promise returned ok, but in reality, it failed.
That's why we switched to S3 that just works.
Pros of Amazon DynamoDB
- Predictable performance and cost62
- Scalable56
- Native JSON Support35
- AWS Free Tier21
- Fast7
- No sql3
- To store data3
- Serverless2
- No Stored procedures is GOOD2
- ORM with DynamoDBMapper1
- Elastic Scalability using on-demand mode1
- Elastic Scalability using autoscaling1
- DynamoDB Stream1
Pros of Amazon S3
- Reliable590
- Scalable492
- Cheap456
- Simple & easy329
- Many sdks83
- Logical30
- Easy Setup13
- REST API11
- 1000+ POPs11
- Secure6
- Easy4
- Plug and play4
- Web UI for uploading files3
- Faster on response2
- Flexible2
- GDPR ready2
- Easy to use1
- Plug-gable1
- Easy integration with CloudFront1
Sign up to add or upvote prosMake informed product decisions
Cons of Amazon DynamoDB
- Only sequential access for paginate data4
- Scaling1
- Document Limit Size1
Cons of Amazon S3
- Permissions take some time to get right7
- Requires a credit card6
- Takes time/work to organize buckets & folders properly6
- Complex to set up3