You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/aws/services/memorydb.md
+21-18Lines changed: 21 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,5 @@
1
1
---
2
2
title: "MemoryDB for Redis"
3
-
linkTitle: "MemoryDB for Redis"
4
3
tags: ["Ultimate"]
5
4
description: Get started with MemoryDB on LocalStack
6
5
---
@@ -11,7 +10,7 @@ MemoryDB is a fully managed, Redis-compatible, in-memory database tailored for w
11
10
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.
12
11
13
12
LocalStack provides support for the main MemoryDB APIs surrounding cluster creation, allowing developers to utilize the MemoryDB functionalities in their local development environment.
14
-
The supported APIs are available on our [API Coverage Page]({{< ref "coverage_memorydb" >}}), which provides information on the extent of MemoryDB's integration with LocalStack.
13
+
The supported APIs are available on our [API Coverage Page](), which provides information on the extent of MemoryDB's integration with LocalStack.
15
14
16
15
## Getting started
17
16
@@ -25,42 +24,46 @@ We will demonstrate how you can create a MemoryDB cluster and connect to it.
25
24
You can create a MemoryDB cluster using the [`CreateCluster`](https://docs.aws.amazon.com/memorydb/latest/APIReference/API_CreateCluster.html) API.
26
25
Run the following command to create a cluster:
27
26
28
-
{{< command >}}
29
-
$ awslocal memorydb create-cluster \
27
+
```bash
28
+
awslocal memorydb create-cluster \
30
29
--cluster-name my-redis-cluster \
31
30
--node-type db.t4g.small \
32
31
--acl-name open-access
33
-
{{< /command>}}
32
+
```
34
33
35
34
Once it becomes available, you will be able to use the cluster endpoint for Redis operations.
36
35
Run the following command to retrieve the cluster endpoint using the [`DescribeClusters`](https://docs.aws.amazon.com/memorydb/latest/APIReference/API_DescribeClusters.html) API:
The cache cluster uses a random port of the [external service port range]({{< ref "external-ports" >}}) in regular execution and a port between 36739 and 46738 in container mode.
50
+
The cache cluster uses a random port of the [external service port range]() in regular execution and a port between 36739 and 46738 in container mode.
47
51
Use this port number to connect to the Redis instance using the `redis-cli` command line tool:
48
52
49
-
{{< command >}}
50
-
$ redis-cli -p 4510 ping
53
+
```bash
54
+
redis-cli -p 4510 ping
51
55
PONG
52
-
$ redis-cli -p 4510 set foo bar
56
+
redis-cli -p 4510 set foo bar
53
57
OK
54
-
$ redis-cli -p 4510 get foo
58
+
redis-cli -p 4510 get foo
55
59
"bar"
56
-
{{< / command >}}
60
+
```
57
61
58
62
You can also check the cluster configuration using the [`cluster nodes`](https://redis.io/commands/cluster-nodes) command:
0 commit comments