Skip to content

Commit 144704f

Browse files
committed
revamp memorydb
1 parent 429e839 commit 144704f

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

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

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
title: "MemoryDB for Redis"
3-
linkTitle: "MemoryDB for Redis"
43
tags: ["Ultimate"]
54
description: Get started with MemoryDB on LocalStack
65
---
@@ -11,7 +10,7 @@ MemoryDB is a fully managed, Redis-compatible, in-memory database tailored for w
1110
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.
1211

1312
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.
1514

1615
## Getting started
1716

@@ -25,42 +24,46 @@ We will demonstrate how you can create a MemoryDB cluster and connect to it.
2524
You can create a MemoryDB cluster using the [`CreateCluster`](https://docs.aws.amazon.com/memorydb/latest/APIReference/API_CreateCluster.html) API.
2625
Run the following command to create a cluster:
2726

28-
{{< command >}}
29-
$ awslocal memorydb create-cluster \
27+
```bash
28+
awslocal memorydb create-cluster \
3029
--cluster-name my-redis-cluster \
3130
--node-type db.t4g.small \
3231
--acl-name open-access
33-
{{< /command>}}
32+
```
3433

3534
Once it becomes available, you will be able to use the cluster endpoint for Redis operations.
3635
Run the following command to retrieve the cluster endpoint using the [`DescribeClusters`](https://docs.aws.amazon.com/memorydb/latest/APIReference/API_DescribeClusters.html) API:
3736

38-
{{< command >}}
39-
$ awslocal memorydb describe-clusters --query "Clusters[0].ClusterEndpoint"
37+
```bash
38+
awslocal memorydb describe-clusters --query "Clusters[0].ClusterEndpoint"
39+
```
40+
41+
The output will be similar to the following:
42+
43+
```json
4044
{
4145
"Address": "127.0.0.1",
4246
"Port": 36739
4347
}
44-
{{< /command >}}
48+
```
4549

46-
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.
4751
Use this port number to connect to the Redis instance using the `redis-cli` command line tool:
4852

49-
{{< command >}}
50-
$ redis-cli -p 4510 ping
53+
```bash
54+
redis-cli -p 4510 ping
5155
PONG
52-
$ redis-cli -p 4510 set foo bar
56+
redis-cli -p 4510 set foo bar
5357
OK
54-
$ redis-cli -p 4510 get foo
58+
redis-cli -p 4510 get foo
5559
"bar"
56-
{{< / command >}}
60+
```
5761

5862
You can also check the cluster configuration using the [`cluster nodes`](https://redis.io/commands/cluster-nodes) command:
5963

60-
{{< command >}}
61-
$ redis-cli -c -p 4510 cluster nodes
62-
...
63-
{{< / command >}}
64+
```bash
65+
redis-cli -c -p 4510 cluster nodes
66+
```
6467

6568
## Container mode
6669

0 commit comments

Comments
 (0)