Loading…
While this loads — worth knowing
Redis has data structures — sorted sets, counters, pub/sub. Memcached has plain keys and nothing else.
Loading…
While this loads — worth knowing
Redis has data structures — sorted sets, counters, pub/sub. Memcached has plain keys and nothing else.
A serverless key-value and document database with single-digit millisecond responses at any scale, and DAX, its in-memory cache, for microseconds.
Where DynamoDB takes you6 steps, all open
DynamoDB is a serverless NoSQL database. It stores items in tables, finds them by key in single-digit milliseconds however large the table grows, and has no servers to size, patch or run. Every table is kept in three Availability Zones.
No joins, but transactions. It holds key-value and document items and answers by key rather than by SQL joins, while still offering ACID transactions across items. DAX, its in-memory cache, brings repeated reads down to microseconds.
A cloakroom. Hand over your ticket and the attendant brings your coat at once, however long the queue, because each coat hangs where its number says. Ask for every blue coat and there is no quick answer, unless someone keeps a second list by colour.
Partition keyItemGlobal secondary indexCapacity unitsDAXGlobal tablesDAX answers GetItem, BatchGetItem, Query and Scan. Calls that manage tables, such as CreateTable, it does not recognise.
An eventually consistent read, the default, can be answered from the cache. A strongly consistent one is passed to DynamoDB.
Is there a copy in the item cache, or for a Query or Scan in the query cache, still inside its TTL of 5 minutes by default?
Pick a case to follow the read through each check.
Nothing to size. No part of the path has a server to choose, and the table in on-demand mode takes whatever arrives.
Changes start work. A stream records every change to an item, in order for that item, keeps it for 24 hours, and can invoke a Lambda function.
Writes in two Regions. Global tables copy the table between Regions, every replica accepts writes, and when two writes clash the last writer wins.
Provisioned capacity is a budget a second. One write capacity unit is one write a second of an item up to 1 KB. One read capacity unit is one strongly consistent read a second, or two eventually consistent ones, of up to 4 KB. Go over the budget and requests are throttled.
Capacity: 1 writes a second, 1 KB each for each.
100 writes a second, 1 KB each more than 500 write capacity units can take. Add 100 more, or shed the load.
Auto scaling moves the budget. It raises and lowers provisioned capacity to keep use near a target utilisation; 70 percent is the recommendation.
On-demand has no budget. It serves what arrives and charges per request. A table can switch from provisioned to on-demand up to four times in 24 hours, and back at any time.
Bigger items take more units. A 3 KB write uses 3 write units, and an 8 KB strongly consistent read uses 2 read units.
DAX helps reads that repeat. Writes, strongly consistent reads and items read only once gain little from it.
Encrypted at rest, always, with a key AWS owns, an AWS managed key, or a customer managed key of your own.
IAM instead of passwords. Every request is signed and allowed by IAM policies; there are no database users or passwords to manage.
Point-in-time recovery restores a table to any second in up to the last 35 days, into a new table.
DAX runs inside your VPC, reached through its security groups.
On-demand charges per read and write request unit; provisioned charges per capacity unit per hour, whether it is used or not.
Storage per GB-month, lower on the Standard-IA table class for tables that are rarely read.
The extras: backups, point-in-time recovery, writes replicated by global tables, and streams.
DAX by the node-hour, for as long as the cluster runs.
Expiring items is free. Time to Live deletes them without using any write throughput.
Prices change, so none are printed here. Check the DynamoDB pricing page on aws.amazon.com.
| Database | Model | Grows by | Choose it when |
|---|---|---|---|
| DynamoDB | Key-value and document, no joins | Itself, with no servers | Lookups by key at any scale |
| RDS and Aurora | Relational, SQL with joins | A larger instance, replicas for reads | Joins and transactions across tables |
| ElastiCache | Keys and data structures in memory | More nodes or shards | A cache in front of any database |
| Index | Keys | Created | Reads | Per table |
|---|---|---|---|---|
| Global secondary | Any partition and sort key | At any time | Eventually consistent only | 20 |
| Local secondary | The table's partition key, another sort key | With the table only | Strong or eventual | 5 |
| Cache | Fronts | Code changes |
|---|---|---|
| DAX | DynamoDB only | Few: it speaks the DynamoDB API |
| ElastiCache | Anything the application puts in it | The application reads and fills it itself |
microsecond reads for a DynamoDB table with minimal code changesDAX
It speaks the DynamoDB API and answers repeated reads from memory.
strongly consistent reads, made faster with DAXDAX does not help them
It passes strongly consistent reads to DynamoDB and caches nothing from them.
query on another attribute, on a table that already existsA global secondary index
A local secondary index can only be created with the table.
strongly consistent reads from an indexA local secondary index
Global secondary indexes are eventually consistent only.
unpredictable traffic, and no capacity planningOn-demand mode
It serves what arrives and charges per request, and it is the default.
run code whenever an item changesDynamoDB Streams with a Lambda trigger
Each change is recorded, in order for its item, and kept for 24 hours.
a multi-Region, multi-active tableGlobal tables
Every replica accepts writes, and a clash goes to the last writer.
remove expired sessions without paying for the deletesTime to Live
Expired items are deleted within a few days, using no write throughput.
store a 2 MB document in each itemS3 for the document, its key in DynamoDB
An item can be no larger than 400 KB.
undo a bad batch job that ran an hour agoPoint-in-time recovery
It restores to any second in up to 35 days, into a new table.
A gaming company keeps player profiles in a DynamoDB table. The same few thousand profiles are read constantly with eventually consistent reads, and read latency must fall from milliseconds to microseconds with as little change to the code as possible. What should a solutions architect do?
A mobile app's API runs on API Gateway and Lambda. Orders are stored and fetched by their order ID, traffic swings from nothing to thousands of requests a second, and the database must have no servers to run and no capacity to plan. What do the functions write to?
4 KB, one strong or two eventual. Write unit: 1 KB.400 KB; bigger objects go to S3.24 hours; a Lambda trigger acts on them.This whole page is free right now.The AWS library is still being written, so every page of it is open to everyone while that lasts. It becomes a paid bundle later; what you read today costs you nothing.
Every fact on this page was checked against AWS’s own documentation on 15 Sept 2026. If AWS has changed something since, its page is the one to trust.