Amazon MemoryDB

active

by Amazon Web Services · since 2021 · also known as MemoryDB, Amazon MemoryDB for Valkey, MemoryDB for Redis

A durable, Valkey/Redis-compatible in-memory database on AWS backed by a multi-AZ transaction log.

key-valuevectormanaged serviceproprietarygrowing

Overview

MemoryDB looks like Redis or Valkey to clients but commits every write to a distributed, multi-AZ transaction log before acknowledging it, so it can serve as a primary database rather than a cache. Reads stay in-memory and fast, while writes pay a few milliseconds for durability. It adds vector search with HNSW indexes, data tiering to SSD on r6gd nodes, and MemoryDB Multi-Region for active-active replication with automatic conflict resolution. It fits microservice state, leaderboards or session data you cannot lose, on AWS.

Strengths & trade-offs

Strengths

  • +Acknowledged writes survive node and AZ failures thanks to the transaction log
  • +Microsecond reads with the full Redis/Valkey data-structure API
  • +Strongly consistent reads from the primary
  • +Built-in vector search for RAG and similarity lookups
  • +Active-active Multi-Region option

Trade-offs

  • −Write latency is single-digit milliseconds, higher than ElastiCache
  • −More expensive than a cache for the same memory
  • −AWS-only; feature exclusions with Multi-Region (no data tiering or vector search)

Great for

  • +Durable session and shopping-cart state
  • +Primary database for microservices using Redis data structures
  • +Real-time leaderboards that must not lose updates
  • +Vector search close to application data

Think twice for

  • −Pure caching where losing data is fine (use ElastiCache)
  • −Large datasets that do not fit in memory economically

Capabilities

Native or official first-party support · 11 of 25 tracked

✓Transactions
✓Vector search
✓Geospatial
✓Stored procedures
✓TTL / expiry
✓Pub/Sub
✓In-memory
✓Durable persistence
✓Encryption at rest
✓Role-based access
✓Streaming ingest
–Joins
–Secondary indexes
–Full-text search
–JSON
–Change data capture
–Triggers
–Materialized views
–Columnar storage
–Compression
–Time travel
–Branching
–Online schema changes
–Offline sync
–Runs in WebAssembly

Scale & consistency

Comfortable data size
Medium · ≤ 10 TB
Horizontal scaling
Native
Multi-region
Active active
Transactions
Limited ACID
Consistency
Strong, Eventual
Schema
Schemaless
Architecture
In memory, Distributed, Primary replica
Query languages
Redis commands (RESP), Lua

Up to 500 shards per cluster; Multi-Region (Valkey 7.3+) replicates asynchronously across up to five regions.

Deployment

Self-hosted Vendor-managed cloud Serverless Embedded Edge Kubernetes operator

available on · AWS

Ecosystem

compatible withRedis
apis & protocolsRESP2/RESP3
client languagesPython, Java, JavaScript, Go, C#, Rust, Ruby, PHP, C

Alternatives to Amazon MemoryDB

Compare all→
Amazon ElastiCacheKey-Value29.1

AWS's managed Valkey, Redis OSS and Memcached service, provisioned or serverless.

amazon-memorydb vs amazon-elasticache →
RedisKey-Value84.3

The in-memory data structure server that became the default cache, now with search, JSON and vectors built in.

amazon-memorydb vs redis →
ValkeyKey-Value58.0

The Linux Foundation's BSD-licensed fork of Redis, now the default engine on AWS and Google Cloud.

amazon-memorydb vs valkey →
Amazon DynamoDBKey-Value63.3

AWS's serverless key-value and document store with single-digit-millisecond reads at any scale.

amazon-memorydb vs amazon-dynamodb →
UpstashKey-Value20.4

Serverless, per-request-priced Redis with an HTTP API built for edge and serverless functions.

amazon-memorydb vs upstash →
Microsoft GarnetKey-Value7.8

Microsoft Research's .NET cache-store that speaks RESP and scales across cores and storage tiers.

amazon-memorydb vs garnet →

Amazon MemoryDB FAQ

What is Amazon MemoryDB?

Amazon MemoryDB is a key-value database by Amazon Web Services, first released in 2021. MemoryDB looks like Redis or Valkey to clients but commits every write to a distributed, multi-AZ transaction log before acknowledging it, so it can serve as a primary database rather than a cache. Reads stay in-memory and fast, while writes pay a few milliseconds for durability. It adds vector search with HNSW indexes, data tiering to SSD on r6gd nodes, and MemoryDB Multi-Region for active-active replication with automatic conflict resolution. It fits microservice state, leaderboards or session data you cannot lose, on AWS.

Is Amazon MemoryDB open source?

No. Amazon MemoryDB is proprietary, closed-source software. License: AWS service terms.

Does Amazon MemoryDB support ACID transactions?

Partly. Amazon MemoryDB offers limited ACID guarantees (for example, single-record or single-partition transactions), with strong, eventual consistency.

Does Amazon MemoryDB scale horizontally?

Amazon MemoryDB scales horizontally out of the box, with built-in sharding or partitioning. It is comfortable at medium scale (≤ 10 TB). It supports active-active multi-region writes.

How can I run Amazon MemoryDB?

You can use the vendor's managed cloud. It is available on AWS.

What is Amazon MemoryDB best for?

Amazon MemoryDB is a strong fit for durable session and shopping-cart state; primary database for microservices using Redis data structures; and real-time leaderboards that must not lose updates. Think twice for pure caching where losing data is fine (use ElastiCache).

What are the best alternatives to Amazon MemoryDB?

Common alternatives to Amazon MemoryDB include Amazon ElastiCache, Redis, Valkey, Amazon DynamoDB and Upstash. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

How popular is Amazon MemoryDB?

Amazon MemoryDB ranks #473 of 844 databases on the WhichDB Score (2.5/100), and #74 among key-value databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.