Amazon DynamoDB vs Amazon RDS for PostgreSQL

Need advice about which tool to choose?Ask the StackShare community!

Amazon DynamoDB

+ 1
Amazon RDS for PostgreSQL

+ 1
Add tool

Amazon DynamoDB vs Amazon RDS for PostgreSQL: What are the differences?


Amazon DynamoDB and Amazon RDS for PostgreSQL are both popular database services provided by Amazon Web Services (AWS). However, they have key differences that make them suitable for different use cases.

  1. Data Model: DynamoDB is a NoSQL database that uses a key-value store data model, allowing for flexible schema designs. On the other hand, Amazon RDS for PostgreSQL is a relational database, following a fixed schema with tables and rows.

  2. Scalability: DynamoDB is designed to scale horizontally by automatically partitioning data across multiple servers. This allows for virtually unlimited storage and throughput as the workload scales. In contrast, Amazon RDS for PostgreSQL can scale vertically by upgrading the hardware running the database but has limitations on storage and throughput based on the chosen instance type.

  3. Query Capabilities: DynamoDB offers fast and efficient querying based on primary key and secondary indexes. It also provides advanced querying capabilities like filtering, sorting, and aggregation. In comparison, Amazon RDS for PostgreSQL supports complex SQL queries, including joins and advanced data manipulations.

  4. Data Consistency: DynamoDB offers eventual consistency by default, where data modifications may take some time to propagate across all replicas. However, it also provides the option for strong consistency, ensuring immediate data consistency. On the other hand, Amazon RDS for PostgreSQL supports ACID transactions and offers strong consistency by default, ensuring immediate data consistency.

  5. Backup and Restore: DynamoDB automatically takes incremental backups and provides point-in-time recovery for up to 35 days. It also offers cross-region replication for disaster recovery. In contrast, Amazon RDS for PostgreSQL provides automated backups with adjustable retention periods and supports cross-region automated backups. It also allows manual snapshots for longer-term backups.

  6. Pricing Model: DynamoDB pricing is based on provisioned throughput, storage, and data transfer. Users pay for the consistent throughput they provision and the storage they consume. Amazon RDS for PostgreSQL pricing is based on instance types, storage, and data transfer. Users pay for the size of the chosen instance type, allocated storage, and data transfer.

In summary, Amazon DynamoDB and Amazon RDS for PostgreSQL differ in their data models, scalability options, query capabilities, data consistency models, backup and restore features, and pricing models. These differences make each service suitable for different application requirements and use cases.

Advice on Amazon DynamoDB and Amazon RDS for PostgreSQL

We are building a social media app, where users will post images, like their post, and make friends based on their interest. We are currently using Cloud Firestore and Firebase Realtime Database. We are looking for another database like Amazon DynamoDB; how much this decision can be efficient in terms of pricing and overhead?

See more
Replies (1)
William Frank
Data Science and Engineering at GeistM · | 2 upvotes · 109.7K views

Hi, Akash,

I wouldn't make this decision without lots more information. Cloud Firestore has a much richer metamodel (document-oriented) than Dynamo (key-value), and Dynamo seems to be particularly restrictive. That is why it is so fast. There are many needs in most applications to get lightning access to the members of a set, one set at a time. Dynamo DB is a great choice. But, social media applications generally need to be able to make long traverses across a graph. While you can make almost any metamodel act like another one, with your own custom layers on top of it, or just by writing a lot more code, it's a long way around to do that with simple key-value sets. It's hard enough to traverse across networks of collections in a document-oriented database. So, if you are moving, I think a graph-oriented database like Amazon Neptune, or, if you might want built-in reasoning, Allegro or Ontotext, would take the least programming, which is where the most cost and bugs can be avoided. Also, managed systems are also less costly in terms of people's time and system errors. It's easier to measure the costs of managed systems, so they are often seen as more costly.

See more

Considering moving part of our PostgreSQL database infrastructure to the cloud, however, not quite sure between AWS, Heroku, Azure and Google cloud. Things to consider: The main reason is for backing up and centralize all our data in the cloud. With that in mind the main elements are: -Pricing for storage. -Small team. -No need for high throughput. -Support for docker swarm and Kubernetes.

See more
Replies (2)
David Weinberg

Good balance between easy to manage, pricing, docs and features.

See more
Max Musing
Founder & CEO at BaseDash · | 1 upvotes · 46.8K views

DigitalOcean's offering is pretty solid. Easy to scale, great UI, automatic daily backups, decent pricing.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Amazon DynamoDB
Pros of Amazon RDS for PostgreSQL
  • 62
    Predictable performance and cost
  • 56
  • 35
    Native JSON Support
  • 21
    AWS Free Tier
  • 7
  • 3
    No sql
  • 3
    To store data
  • 2
  • 2
    No Stored procedures is GOOD
  • 1
    ORM with DynamoDBMapper
  • 1
    Elastic Scalability using on-demand mode
  • 1
    Elastic Scalability using autoscaling
  • 1
    DynamoDB Stream
  • 25
    Easy setup, backup, monitoring
  • 13
    Geospatial support
  • 2
    Master-master replication using Multi-AZ instance

Sign up to add or upvote prosMake informed product decisions

Cons of Amazon DynamoDB
Cons of Amazon RDS for PostgreSQL
  • 4
    Only sequential access for paginate data
  • 1
  • 1
    Document Limit Size
    Be the first to leave a con

    Sign up to add or upvote consMake informed product decisions

    No Stats

    What is Amazon DynamoDB?

    With it , you can offload the administrative burden of operating and scaling a highly available distributed database cluster, while paying a low price for only what you use.

    What is Amazon RDS for PostgreSQL?

    Amazon RDS manages complex and time-consuming administrative tasks such as PostgreSQL software installation and upgrades, storage management, replication for high availability and back-ups for disaster recovery. With just a few clicks in the AWS Management Console, you can deploy a PostgreSQL database with automatically configured database parameters for optimal performance. Amazon RDS for PostgreSQL database instances can be provisioned with either standard storage or Provisioned IOPS storage. Once provisioned, you can scale from 10GB to 3TB of storage and from 1,000 IOPS to 30,000 IOPS.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use Amazon DynamoDB?
    What companies use Amazon RDS for PostgreSQL?
    See which teams inside your own company are using Amazon DynamoDB or Amazon RDS for PostgreSQL.
    Sign up for StackShare EnterpriseLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Amazon DynamoDB?
    What tools integrate with Amazon RDS for PostgreSQL?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    Blog Posts

    What are some alternatives to Amazon DynamoDB and Amazon RDS for PostgreSQL?
    Google Cloud Datastore
    Use a managed, NoSQL, schemaless database for storing non-relational data. Cloud Datastore automatically scales as you need it and supports transactions as well as robust, SQL-like queries.
    MongoDB stores data in JSON-like documents that can vary in structure, offering a dynamic, flexible schema. MongoDB was also designed for high availability and scalability, with built-in replication and auto-sharding.
    Amazon SimpleDB
    Developers simply store and query data items via web services requests and Amazon SimpleDB does the rest. Behind the scenes, Amazon SimpleDB creates and manages multiple geographically distributed replicas of your data automatically to enable high availability and data durability. Amazon SimpleDB provides a simple web services interface to create and store multiple data sets, query your data easily, and return the results. Your data is automatically indexed, making it easy to quickly find the information that you need. There is no need to pre-define a schema or change a schema if new data is added later. And scale-out is as simple as creating new domains, rather than building out new servers.
    The MySQL software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software.
    Amazon S3
    Amazon Simple Storage Service provides a fully redundant data storage infrastructure for storing and retrieving any amount of data, at any time, from anywhere on the web
    See all alternatives