---
title: Amazon MemoryDB for Valkey
description: MemoryDB for Valkey is an in-memory database compatible with the open-source Valkey engine (Redis 7.x fork) — durable, multi-AZ, with up to 65% lower cost vs MemoryDB for Redis OSS.
url: https://www.factualminds.com/glossary/memorydb-valkey/
publishDate: 2026-06-13
updateDate: 2026-06-13
---

# Amazon MemoryDB for Valkey

> MemoryDB for Valkey is an in-memory database compatible with the open-source Valkey engine (Redis 7.x fork) — durable, multi-AZ, with up to 65% lower cost vs MemoryDB for Redis OSS.

## Definition

Amazon **MemoryDB for Valkey** is a **durable, in-memory database** using the **Valkey** engine — the Linux Foundation-maintained fork of Redis 7.x after Redis Inc.'s SSPL licensing change. MemoryDB targets **primary-database** use cases (session stores, gaming leaderboards, real-time feature flags) that need Redis API compatibility plus **multi-AZ durability** via a distributed transaction log — not merely a cache that can evict keys under pressure. AWS prices MemoryDB for Valkey substantially below MemoryDB for Redis OSS on equivalent shapes.

Valkey remains **wire-protocol compatible** with Redis clients, Lua scripts, and most open-source commands, but **Redis Inc. commercial modules** (some RediSearch/RedisJSON variants) may not port cleanly. **ElastiCache for Valkey** covers pure cache workloads at lower cost and lower write latency; MemoryDB pays the durability tax.

| Aspect     | ElastiCache (Valkey) | MemoryDB (Valkey)             |
| ---------- | -------------------- | ----------------------------- |
| Role       | Cache                | Primary in-memory DB          |
| Durability | Optional snapshots   | Multi-AZ transaction log      |
| Latency    | Sub-ms reads typical | Low-ms writes with durability |
| Cost       | Lower per GB         | Higher per GB                 |

## When to use it

- **Session stores, leaderboards, rate limiters** where rebuild-from-DB on cache miss is unacceptable.
- **Redis API** shops migrating off self-hosted Redis or ElastiCache for Redis to escape SSPL licensing uncertainty.
- Workloads needing **Multi-AZ failover** with Redis semantics and no custom Patroni-style clustering.
- Small-scale **vector search** via Valkey search modules where OpenSearch or S3 Vectors is overkill.

## When not to use it

- Pure **cache** layers — ElastiCache Serverless or provisioned Valkey is cheaper and faster.
- **Multi-region active-active** — consider DynamoDB Global Tables, Aurora Global Database, or explicit multi-region MemoryDB Global Datastore patterns with eyes open on conflict handling.
- Heavy relational reporting — export to Aurora or Redshift instead of growing memory datasets indefinitely.

## Tips

- Size MemoryDB **20–30% above** ElastiCache guidance — durable write path consumes additional CPU headroom.
- Validate **module dependencies** before migration — replace Redis Inc. proprietary modules with Valkey equivalents or sidecar services.
- Use **AWS DMS** or **RIOT** for live replication and checksum validation rather than snapshot-only cutovers on busy keys.
- Enable **TLS and ACL users** per application — shared `default` user with `ALLKEYS` is an audit finding waiting to happen.
- Set **maxmemory policies** deliberately even on durable stores — unbounded key growth still hurts failover time and backup windows.

## Gotchas

- **Serious:** **Snapshot-only migration** under write load loses keys — always validate key counts and checksums post-cutover.
- **Serious:** Assuming **Redis Inc. modules** work unchanged — production startup fails or silently drops features when modules mismatch.
- **Regular:** **Durability ≠ backup strategy** — schedule snapshots and test restores; transaction logs are not a time-travel archive.
- **Regular:** **Large values** in MemoryDB inflate failover and sync times — keep values small; offload blobs to S3.
- **Regular:** **Global Datastore** failover is not zero RPO for all clients — apps must handle brief write unavailability during promotion.

## Official references

- [Migrating to MemoryDB for Valkey](https://docs.aws.amazon.com/memorydb/latest/devguide/migration.html) — DMS and online migration paths.
- [MemoryDB ACLs](https://docs.aws.amazon.com/memorydb/latest/devguide/clusters.acls.html) — user and command set restrictions.

## Related FactualMinds content

- [ElastiCache Serverless](/glossary/elasticache-serverless/) — cache-tier alternative
- [Amazon DynamoDB](/glossary/amazon-dynamodb/) — durable NoSQL at scale
- [AWS Application Modernization](/services/aws-application-modernization/)
- [AWS Serverless Architecture](/services/aws-serverless/)

## Related AWS Services

- aws-application-modernization
- aws-serverless

---

*Source: https://www.factualminds.com/glossary/memorydb-valkey/*
