Skip to content

Commit 6367417

Browse files
docs: add valkey support for memory db and elasticache services (#143)
1 parent 28d5b7f commit 6367417

File tree

2 files changed

+74
-8
lines changed

2 files changed

+74
-8
lines changed

src/content/docs/aws/services/elasticache.mdx

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "ElastiCache"
33
tags: ["Base"]
4-
description: Get started with AWS ElastiCache on LocalStack
4+
description: Get started with Amazon ElastiCache on LocalStack
55
persistence: supported
66
---
77

@@ -12,12 +12,13 @@ import FeatureCoverage from "../../../../components/feature-coverage/FeatureCove
1212
Amazon ElastiCache is a managed in-memory caching service provided by Amazon Web Services (AWS).
1313
It facilitates the deployment and operation of in-memory caches within the AWS cloud environment.
1414
ElastiCache is designed to improve application performance and scalability by alleviating the workload on backend databases.
15-
It supports popular open-source caching engines like Redis and Memcached (LocalStack currently supports Redis),
16-
providing a means to efficiently store and retrieve frequently accessed data with minimal latency.
15+
16+
Amazon ElastiCache supports popular open-source caching engines like Redis, Valkey, and Memcached.
17+
LocalStack currently supports Redis and Valkey, enabling developers to simulate ElastiCache behavior locally for efficient, low-latency data caching.
1718

1819
LocalStack supports ElastiCache via the Pro offering, allowing you to use the ElastiCache APIs in your local environment.
19-
The supported APIs are available on our [API Coverage section](#api-coverage),
20-
which provides information on the extent of ElastiCache integration with LocalStack.
20+
21+
The supported APIs are available on our [API Coverage section](#api-coverage), which provides information on the extent of ElastiCache integration with LocalStack.
2122

2223
## Getting started
2324

@@ -115,6 +116,39 @@ Another reason you might want to use the container mode is to check the logs of
115116

116117
To do this, you can set the `REDIS_CONTAINER_MODE` configuration variable to `1`.
117118

119+
## Valkey Engine
120+
121+
LocalStack offers the additional option to use Valkey as an alternative to Redis in Amazon ElastiCache.
122+
123+
To enable full Valkey emulation:
124+
125+
1. Start LocalStack with Valkey support enabled by setting the environment variable, `REDIS_CONTAINER_MODE=1`
126+
2. Create a cluster with the Valkey engine by including the `--engine valkey` flag in your API call:
127+
128+
```bash
129+
awslocal elasticache create-replication-group \
130+
--replication-group-id my-valkey-group \
131+
--replication-group-description "Valkey test group" \
132+
--engine valkey \
133+
--cache-node-type cache.t4g.small \
134+
--num-node-groups 1 \
135+
--replicas-per-node-group 1 \
136+
--automatic-failover-enabled
137+
```
138+
139+
Valkey support includes:
140+
141+
- The ability to specify `valkey` as the engine when creating Amazon ElastiCache replication groups.
142+
143+
- Automatic mapping of each engine to a default supported version (Redis `7.2.10`, Valkey `7.2.10`), ensuring DockerHub compatibility.
144+
145+
- Support for the `Engine` and `EngineVersion` fields in the `CreateReplicationGroup` API, which now recognize and handle `valkey`.
146+
147+
148+
::: note
149+
A Valkey replication group can only be started when [container mode](/aws/services/elasticache/#container-mode) is enabled.
150+
:::
151+
118152
## Resource browser
119153

120154
The LocalStack Web Application provides a Resource Browser for managing ElastiCache resources.

src/content/docs/aws/services/memorydb.mdx

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "MemoryDB for Redis"
2+
title: "MemoryDB"
33
tags: ["Ultimate"]
44
description: Get started with MemoryDB on LocalStack
55
---
@@ -8,8 +8,9 @@ import FeatureCoverage from "../../../../components/feature-coverage/FeatureCove
88

99
## Introduction
1010

11-
MemoryDB is a fully managed, Redis-compatible, in-memory database tailored for workloads demanding ultra-fast, primary database functionality.
12-
It streamlines the deployment and management of in-memory databases within the AWS cloud environment, acting as a replacement for using a cache in front of a database for improved durability and performance.
11+
Amazon MemoryDB is a fully managed, in-memory database service designed for ultra-fast, primary database use cases. Compatible with both Valkey and Redis OSS, it improves performance and durability.
12+
13+
Built for the AWS cloud environment, MemoryDB simplifies the deployment and operation of in-memory databases, acting as a replacement for using a cache in front of a database.
1314

1415
LocalStack provides support for the main MemoryDB APIs surrounding cluster creation, allowing developers to utilize the MemoryDB functionalities in their local development environment.
1516
The supported APIs are available on our [API Coverage section](#api-coverage), which provides information on the extent of MemoryDB's integration with LocalStack.
@@ -72,9 +73,40 @@ This approach directs LocalStack to launch Redis instances in distinct container
7273
Additionally, container mode is beneficial for independently examining the logs of each Redis instance.
7374
To activate this, set the `REDIS_CONTAINER_MODE` configuration variable to `1`.
7475

76+
77+
## Valkey Engine
78+
79+
LocalStack offers the additional option to use Valkey as an alternative to Redis in Amazon MemoryDB.
80+
81+
To enable full Valkey emulation:
82+
83+
1. Start LocalStack with Valkey support enabled by setting the environment variable, `REDIS_CONTAINER_MODE=1`
84+
2. Create a cluster with the Valkey engine by including the `--engine valkey` flag in your API call:
85+
86+
```bash
87+
awslocal memorydb create-cluster \
88+
--cluster-name my-valkey-cluster \
89+
--node-type db.t4g.small \
90+
--acl-name open-access \
91+
--engine valkey
92+
```
93+
94+
Valkey support includes:
95+
96+
- The ability to specify `valkey` as the engine when creating Amazon MemoryDB clusters.
97+
98+
- Automatic mapping of each engine to a default supported version (Redis `7.2.10`, Valkey `7.2.10`), ensuring DockerHub compatibility.
99+
100+
- Support for the `Engine` and `EngineVersion` fields in the `CreateCluster` API, which now recognize and handle `valkey`.
101+
102+
::: note
103+
A Valkey cluster can only be started when [container mode](/aws/services/memorydb/#container-mode) is enabled.
104+
:::
105+
75106
## Current Limitations
76107

77108
LocalStack's emulation support for MemoryDB primarily focuses on the creation and termination of Redis servers in cluster mode.
109+
78110
Essential resources for running a cluster, such as parameter groups, security groups, and subnet groups, are mocked but have no effect on the Redis servers' operation.
79111

80112
LocalStack currently doesn't support MemoryDB snapshots, failovers, users/passwords, service updates, replication scaling, SSL, migrations, service integration (like CloudWatch/Kinesis log delivery, SNS notifications) or tests.

0 commit comments

Comments
 (0)