Where do we use DynamoDB?

Where do we use DynamoDB in real-world applications, and what kind of problems does it solve compared to a traditional relational database like MySQL or PostgreSQL? Please explain with practical use cases such as user sessions, shopping carts, IoT data, gaming leaderboards, metadata storage, and high-scale applications.


Related discussions:

Upload speed to EC2, how to get more?
re:Invent 2016 Tips, Tricks, and Survival Guide
Building multiple Drupal sites hosted in AWS. Best practices?
Setting Param Group and Security group on Restore in RDS
tinder-like architecture
Can't access RDS from EC2 instance in VPC.
What service stack in AWS would you use to compile and store reports on row updates in RDS Postgres?
Question about connecting to VPC data stores from Lambda
What are considered best practice in regards to the scope of a VPC?
AWS Career Development
Noob question: Does resizing an RDS Db disrupt ongoing connections?
What are my options for "serverless" user authentication?
AWS Dev Associate
DynamoDB trivia: reads throttled but under capacity
I would like help understanding why RDS Aurora would save me money over RDS MySQL
AWS RDS with sql Express can not connect, anyone have this working?
Saving $ using a local cache instead of getting data from RDS?
[Straw Poll] - Increase in RDS hardware failures?
AWS RDS Maintenance - Is it possible to perform this maintenance manually before the maintenance window?
Logging with RDS?
AWS Certificate Manager support for CAA DNS records
Using DynamoDB TTLs to get something (money?) for nothing
What is the tagging scheme used?
Exporting RDS Logs into 3rd party logging?
Zero downtime migration from unencrypted RDS PostgreSQL to encrypted RDS PostgreSQL
Can i use Athena to query things in an RDS database?
Lambda RDS connection timeout
AWS RDS phasing out M1 and M2 instance families.
Step Functions - Should all the RDS related steps be done in one step or multiple steps?
SQS messages 'in-flight' is more than the total number of messages
permanently public (no pre-signing required) s3 POST url
How to use own domain for Elastic Beanstalk URL?
Method to be notified of RDS Recommendations?
Discounts for running production SaaS product?
Anyone hosting QuickBooks files in AWS Workspace? I have a few user that need to connect to the same shared folder where the QB files are.
Amazon DynamoDB On-Demand – No Capacity Planning and Pay-Per-Request Pricing
Is DynamoDB a bad choice for an MVP with one developer? Is it worth the added complexity?
Cognito alternative or a solution?
Kinesis at Scale, how's it working out for you?
Help: Feedback/tips on how to properly design a DynamoDB database
Hourly RDS snapshot and storage strategy
DynamoDB: How to model a table that is designed based on adjacency lists in Java?
Does an NLB maintain a connect to clients or does it pass connection attempts to targets?
for those who've passed dev associate?
What micro-services would I use for this?
Where to store supplemental application data in a NoSQL/DynamoDB architecture
I want 0 downtime for Aurora RDS. Is that possible?
We built an open source HTML contact form generator with AWS Lambda, API Gateway, DynamoDB, SES and S3
Detect and alert on PII in CloudWatch logs
Automated RDS snapshots and size
Is AWS Beanstalk worth the setup and getting-used-to for me?
Simplest way to "bind" a ubuntu ec2 instance's localhost:5432 port to an rds instance at some-aurora-db.cluster-redacted.us-east-1.rds.amazonaws.com so that navigating to localhost:5432 on ec2 connects to the rds instance?
Could an Amazon and Oracle merger be possible?
Is there a standard way to design VPC architecture diagrams?
Multi-region serverless API deployments
RDS DB hacked, what should I do?
RDS Data API Inconsistency and weird behavior
ELI5: When should you use RDS over DynamoDB?
[BEGINNER HELP] Connecting RESTful API to RDS Help!
Can't upgrade from db.m4.xlarge to db.m5.12x.large
CRUD App backend: API Gateway also, or just Lambda?
DynamoDB Table design - to RDBS
Postgres aurora major version upgrade
Automatically delete Manual RDS Snapshots older than x days
Concern of running SQL statements over network vs importing a dump?
trying to connect to an RDS from my EC2 instance.... not sure what to do?
⚡️ Dynatron - Bridge between AWS DynamoDB Document Client and Real World usage
My RDS instance went into "storage optimization" status
How are you securely tunneling to RDS instances in a private subnet?
DynamoDB multiplayer game tutorial doesn't factor in real-world conditions?
Hosting database on EC2
An over-engineered todo app to demonstrate AWS Serverless products
Moving to AWS - Architecture Planning
Anyone else bummed reverting to RDS because Aurora IOPS is too expensive?
I explain some concepts about data modelling in DynamoDB by modelling a product catalog
Is going serverless a good idea for me? For example asos.com ditching EC2 for AWS serverless products.
Move Route53 hosted zone from one account to another
Off-the-shelf ways of checking which tables in my live RDS vs back-up RDS have different data? I.e. table by table comparison of 2x different databases.
More than 40k RCU/WCU in dynamodb?
Best cloud solution for mongodb to scale immediately on instant traffic peaks?
[DynamoDB] How to do single table design if I have a "common table" (reference data) that will be acessed by every user?
SES Email in Spam
Redis issue after user ramp up to 100k
Apache spark on Lambda? Possible?
Elastic Beanstalk says my instance health is "Severe" yet things seem to be running fine
Do I need encryption here?
Is There Any Way to Auto-Generate a GraphQL/DyanamoDB API (Similar to Posgraphile)?
How important is it that you know how to program? And what languages would you recommend?
problem after migrating to AWS RDS
What is the purpose of AWS prepay?
Learning How To CFN, common scenarios
My Most Loved AWS Developer Tools & Resources
Amazon RDS now supports Internet Protocol Version 6 (IPv6) on RDS Management APIs
Creating security groups by service and by "service user"?
Max number of MySQL database per RDS instance?
Pagination approach Dynamo db
dynamodb - design sparse index for chat based app?
Can I block http requests on AWS WAF?
Clarification on Load Balancers
DynamoDB unmarshall array of DynamoDB records? (SDK v3 javascript)
Database for a Startup with 1 dev?
The DynamoDB paper - A rare look at a real-world distributed system that runs at massive scale
RDS Multi AZ Config
Lambdas being throttled despite below unreserved concurrency & rate limits?
Aurora Serverless 2 - Cost estimation
Cannot resolve RDS Instance Endpoint name with AWS-Client-VPN - Only IP addresses
Did anyone else's rds backup scripts fail with the latest update
RDS now supports PostgreSQL 15
Cross region EventBridge losing events.
Paying for AWS services by credit card (AWS doesn't accept CVV)
My first production application expecting 20.000 users, NEED ADVICE
Large unexplained sustained drops and spikes in Amazon RDS DB instance CPU Utilization
Best way to decrease latency (API <-> Lambda <-> Dynamodb)
Modyne: a DynamoDB ORM-like for single-table design
I chose IAM Identity Center, was this a dumb thing to do?
What would be the best approach to set up environment variables for an app running in ec2?
Dynamodb with aws iot suggestions
Considering DynamoDB for storing and tracking status updates
Single table design for DynamoDB: The reality
Inserting 10ks records into Redshift with python redshift_connector is slow. Alternative?
DynamoDB Price changed recently?
Considering EFS vs S3 for Workflow Migration to AWS. Thoughts?
Is OpenSearch overkill for my usecase?
What do you do when something out of your control happens and AWS doesn't respond to the ticket?
RDS postgres historical performance analysis
Why my bill on VPC keeps growing even after deleting all my instances and resources?
Why can't I buy RDS MySQL Community reserved instances?
Best aws service to process large number of files
The real cost of RDS for serverless?
Lambda to Spin up EC2 server Architecture Discussion
What is the best and cheapest database solution on aws
DynamoDB vs S3 when using images
What's the best strategy to reduce AWS costs without compromising performance?
Nextjs vercel to aws
Upgraded yesterday from RDS MySQL 5.7.44 "Extended Support" to MySQL 8.x to reduce costs. Today my forecasted month end costs have almost tripled, which doesn't make much sense. Is this just a temporary glitch?
How can I connect to my Aurora MySQL setup in a private subnet via MySQL Workbench?
Best practice for DynamoDB in AWS - Infra as Code
Is there any downscaler for rds, mq, redis instances?
RDS to S3 to Redshift
Intermittent network issues in ap-southeast-2
Any good Udemy courses, YouTube videos, etc which focus on teaching AWS from a purely practical perspective?
Seeking Advice/Guidance on project architecture
Is Dynamo Actually More Performant Than RDS?
How a Simple RDS Scheduler Job Led to 21TB Inter-AZ Data Transfer on AWS
How fast is a 1mb query in DynamoDB
How To Store Images For Use By AWS Lambda?
RDS Instance Size Templates - Should I Disregard Them?
AWS route 53 subdomains with GoDaddy
Hosting Wordpress on AWS
RDS Postgres run from Lambda, and selecting Schema?
Looking for guidance: configuring backups for RDS on AWS
RDS free tier limit about to be reached but I don't have a database running
Internship at AWS, how should I prepare
When DynamoDB single-table design is the wrong choice (and what to use instead)
Split Horizon DNS Question
Why is there no cheap options for relational databases on AWS?
Serious question: how are people actually inspecting DynamoDB data in production?
ssmctl v2 — a CLI that makes SSM session manager actually usable
Root user MFA failing.
Managing PostgreSQL major version upgrades for 3,000+ databases per RDS instance with Aurora
Just took the aws developer associate exam
Study Towards Current Or New Architect Associate?
Looking For Guidance on Prepping for Security Specialization
Portfolio in lieu of experience to get a job?
What exactly are record checks in regards to DNS?
Passed AWS CCP (Feb 14)
What level programmer do I need to be to build a portfolio of projects, get a job, and be a successful solutions architect?
Confused about this question from a Udemy Course - please help
Why you should avoid AWS Exam Dumps
What are are characteristics of Amazon RDS Read Replicas?
Is the Security Specialty exam really good or do I just have Stockholm Syndrome?
Flashcard for CCP
Sitting AWS SA Pro in a week - am I ready?
Question from past papers
AWS RDS database should not have default master username
Greetings just passed my SAA-C02, what’s the best resource to learn JavaScript and Python?
Is there any short study guide/pre-made flashcards for the Developer Exam? Already went through the Udemy course on this and taking practice exams on it through tutorialdojo, but still feel I need shorter review session. Help?
RCU Calculation. Am I going crazy?
Completed solutions architect with pass result but proctor says he will report me for violation request to deny the result
Passed my SAA-C02 today
Passed Solutions Architect Associate (SAA-C02) Today!
Any buzzword when searching for jobs?
What is meant by "ingestion" in the context of this question?
How much overlap does Stephane Maareks SAAC-02 have with his DVA-01?
DynamoDB - how can we achieve RPO < 2 minutes?
Not Sure How To Proceed Studying SAA - C02 Exam
Passed SAA-002
Am I ready for the AWS Certified Cloud Practitioner exam?
AWS Labs
AWS SysOps Exam
Im getting my Cloud Practioner Next Month Entry level jobs?
SSA-S03: exam vs test exam topics
Passed DBS-C01 Database Specialty (score 921)
Tracking Study Hours for SAA-C03
CCP exam in few days. Can somebody recommend me some great practise exams?
Passed SA Pro SAP01 on the last day
Help understanding SCPs
Just Passed AWS Certified Cloud Practitioner.
AWS vs Azure
Taking an exam at PearsonVue testing center. What can I expect?
Passed AWS CCP! First cloud cert unlocked.
Just passed cpp
Suggested Offline Resources for SAA Exam
Is Stephane Maarek's AWS Cloud Practitioner CLF-C01 Udemy Course Enough to Pass the New C02 Exam?
SAA exam in a week
Any one explain to me why the answer is B?
Passed SAA-C03 with Cantrill & TD
How do you guys keep track of all the steps in AWS labs?
How do I understand what exactly in RDS is being billed?
[RDS] - Migrating from MySQL 5.7 to Aurora
AWS Free Tier, exceeding usage
API Gateway -> Lambda -> DynamoDB query
Migrating from MySQL (RDS) to Aurora with no downtime (blog)
Question about pricing - AWS Full Stack Web Interface
EBS Node deployment takes forever

The use case is quite different than traditional relational databases. DynamoDB’s premise is that it’s a) a fully managed service, no need to maintain it, manage upgrades, backups, etc. and b) you’ll get practically infinite scaling IF you know your access patterns and can index the tables accordingly. This comes with the cost of not being able to query as freely as you can in other databases (you can make fast queries on the indexed fields, otherwise you scan them all).

It also has the advantage of being fully compatible with other AWS services, so you can get your code to run with IAM permissions for just a specific primary key (great for tenant isolation for example), as well as Dynamo Stream, which lets you trigger events when there are changes / inserts in the table.

It definitely has use cases, I’ve developed a few things with it that run in production to this day quite well. I would not pick it as the primary database for a new large project though in most cases. I think even in Alex Debrie’s book on Dynamo (he’s one of the known DynamoDB “gurus”) he says that if you’re a young startup, DynamoDB is probably not the DB for you (Pretty sure he said that, not 100% sure, not going to look for the exact quote, but the message is true IMO )

Literally just copy that as a prompt into Quick, Claude, chatgpt etc and you will get your answer.

cross-region deployment (as long as you can live without ACID), fail-over doesnt count here. DynamoDB can be active-active.

dont have to worry log shipping, binlog tracking, aurora failover/fallback, etc it just works…

It’s cheap fast and easy when it fits. So at the start of most projects I consider it. I mostly end up using Postgres.

Most of the time the fit is if you have data that has a very rigid access pattern, and doesn’t benefit from being relational. Most data doesn’t fall into either of those categories let alone both. But doing it as a thought exercise fleshes out access patterns, some of which may have been a problem if overlooked.

Most of the uses I’ve had are materialized analyitics with few if any pivots. Like a spark job or flink aggregating things then stuffing the output in a table for fast retrieval.

Then there’s random goofy shit like deduplication tables that fit nicely. Say you want exactly once semantics on an sqs queue. Use a conditional write of an idempotent value from an event on the condition that it doesn’t already exist. sqs is at least once delivery, the deduplication makes it at most once, and using dynamo is really friggin fast. And supports ttls. (There are better ways to do something similar, but sometimes it’s easier to deal with decisions of the past than to forklift them out.)

Terraform state lock is the only time I’ve used it

When you don’t understand a system, lookup whitepaper.

https://www.usenix.org/system/files/atc22-elhemali.pdf

Lets just have no further human to human communication or original thought because chatGPT can just tell us what to do with our meat levers.

We have s3 object lock now

One real-world application for Dynamodb is for messaging.

Imagine you are making a CRM or a marketing platform system which handles millions of message exchange per day and you want to store the message for X days. Dynamodb makes its very easy with practically infinite scale with in built TTL settings.

To pit it very simply:

  1. Scale to zero. Use zero pay zero. This is very important for prototyping and startups. Less of a differentiator since Aurora DSQL was released last year and that effectively gives you the same benefit with a relational database.
  2. Scale to infinity. You trade higher upfront design and a frugal interface for extremely flexible scaling. This is very important for high throughput or spiky application traffic. The original use case was basically “i know my access pattern, i dont need the flexibility, i just want to make sure that i can always write to this database and my changes are always eventually persisted”

You may be thinking “scale to infinity? Thats overkill, who actually needs that?”.

Amazon does. Thats why they made it. If you are not Amazon, Microsoft, Google, Netflix scale, then a relational database will likely serve your needs just fine with a lot less hacks and application-level implementations of joins / complex query logic (don’t get me started on single table design — again if you’re not Amazon scale then you do not single table designs, even if you choose to go with DynamoDB).

I worked at Amazon so I’m very comfortable with DynamoDB. Only because I used it for years. Anyone else should probably start with PostgreSQL. If you dont want to manage instances at all and need scale to zero, try Aurora DSQL.

It sits in between SQL (main db) and ephemeral cache for me. Basically for reconstructible data like reports that doesn’t need to expire like cache.

Very true! I always think about Just Use Postgres with questions like these. If you’re not sure which data store to use, Postgres is the right answer.

Even if you’re pretty sure you can live with all the limitations DynamoDB imposes on your architecture right now, it’s not like Postgres where its flexibility means there’s always at least some room to refactor or optimise.

Spun up an app that needed user sessions and tossed it in dynamo. Pretty fast & cheap

Also elasticity. We abuse the shit out of that to get some incredibly cheap burst capacity. MongoDB were trying to sell us a move to atlas and they couldn’t come anywhere near it price wise.

I’ve built whole systems using dynamodb + lambda. Eg an operational checklist system saas used by enterprises. You have to think and architect a little differently with dynamodb, eg using lambda triggers on a table change stream to update a related table, rather than using relations. It has nice features too that are more cloud - it’s easy to run lambas which send to websockets when a given table is updated (and therefore updates data live in a web app) or makes requests to another api for integrations. I’ve pretty much moved away from relational databases because (1) cost - especially for having multiple stacks for testing etc (2) single point of failure - though I’ve never actually been caught by that with rds and many people I’m sure run with no downtime (3) no administration needed (sql versions/upgrades/instance sizing etc) (4) when you get used to it it feels more ‘cloud’ and you can build whatever you want, the scalability in both directions opens up possibilities, the lambda integration is useful and the admin overhead of relational becomes more apparent

Same experience here. I’ve used it to persist state for fully event driven architectures. Works really well, and I would encourage the use of single table design. You will need to consider your access patterns up front as others have noted ~ but it’s NOT that crazy, just different for many new to the concept.

Minor perk, not saying this is THE reason to go DDB, just nice: I like to build ephemeral environments for apps and services, so DDB is amazing for this. RDS usually takes 10-15 minutes to provision, which is forever in ephemeral deployment speak. With my EDA serverless apps, the whole app or service is up in about 1-2 minutes and I’m running full E2E tests

We use it for basically everything, inside a serverless application.

The app is written as a modular monolith, with business functionality split into packages - which expose storage abstractions which are invariably implemented on top of DynamoDB and/or S3.

This has scaled very well: this isolation means that any complexity involved in implementing a feature in DynamoDB (e.g. complex key structures) does not leak outside the package, and it’s very rare for new features to require table modification.

As coding agents came along, we found it’s also a rich source of examples: we can point Claude at a few representative packages and get something that works straight out of the box and follows all the existing conventions and style - again leveraging the self-contained nature of the packages.

By contrast, with a relational database, you are invariably designing a model and table structure that must work for many possible use-cases - present and future/ This means multiple overlapping consumers of each part of the model - each with different needs - and migrations and refactors as you correct design errors which will then affect all those consumers. Of course you can do table-per-package or table-per-microservice but then you’re giving up a lot of the advantages of the relational model in the first place, IMHO.

I’ve built systems both ways for many years at this point, and they both have strengths and weaknesses, but since the vast majority of storage is just simple CRUD, I find DynamoDB is a good fit for most use cases as long as you design for it from the outset.

It does a bounded amount of work per request. This restriction is actually a blessing if you anticipate scaling.

Better to say where it struggles and how you adapt. Don’t use it for data tables with multiple filters and sorts. Don’t try to do many-to-many mappings. Denormalise your data, use adjacency list pattern. You can write a 200 line lambda and use CDC to send data into ElasticSearch. That will give you more search capabilities.

It Depends. (Like everything in IT.) It’s great if what you need is a simple flat-file with one, or few, indexes (items you’d need to retrieve based on their contents.) If you need to filter or retrieve based on any value, it’s not for you. If you need to setup complicated relationships between tables (and query on them), it’s not for you.

If you find your workflow involves scanning every line of a DDB looking for something, or building reports about every line in the DB, it’s going to be very expensive, very quickly.

In the end, as always, it comes down to business needs, and then making the trade-offs to meet those business needs. A single project might have parts that are suitable for one, and other parts best put in the other. (e.g. a supply-chain management system for a retailer will probably be relational. The shopping cart for that same retailer will probably be best-suited for NoSQL.)