Aurora Postgres has many cool features. Let's compare them to DynamoDB and review them. While I'm writing this article, the latest version of Postgres - v17.4
Key-value and document data models - We don't need to talk about key-value. It is more interested in "how to store document data?". Postregs has a special type to sore JOSN data - JSONB. It was introduced in version 9.4 more than 10 years ago. Using EF Core 8 we don't even need to think of serialization/deserialization - just use it.
Serverless that scales to zero - AWS introduced scaling to 0 capacity with Amazon Aurora Serverless v2. It is an infrastructure-level configuration, but keep in mind a cold start during resuming.
ACID transactions - nice joke 😄
Active-active replication with global tables - here is an AWS blog post on configuring active-active replication for Postgres. It is an infrastructure-level configuration.
DynamoDB Streams as part of an event-driven architecture - postgress logical replication. A Short article about AWS RDS configuration here. The .Net
Npgsql
data provider has abstraction for logical replicationSecondary indexes - postgres jsonb type support Generalized Inverted Index. and can efficiently search using then.
Time to live - postgres pg_cron extension that we can use to schedule row delition. But before that, we need to configure rds
Bulk import from S3 - easy, just add permission and go on.
Finally, do you want to trigger aws lambda from RDS? No problem, we can do that.
Conclusion
Before choosing DynamoDB for your project, I recommend creating a Proof of Concept (PoC) using Aurora Postgres to validate your non-functional requirements (NFRs). With its mature feature set and broad support for complex use cases, Aurora Postgres can often be an excellent alternative for many workloads, saving you from introducing the complexity of a NoSQL database when a relational solution might meet your needs just as well.
Top comments (0)