This lab teaches you how to deploy a MemoryDB cluster, connect to the cluster using the ValKey client, and enable high availability for cluster shards.
Objectives
- Create and configure an Amazon MemoryDB cluster using the AWS Management Console.
- Set up appropriate security groups and network settings to enable connectivity between an EC2 instance and a MemoryDB cluster.
- Establish a connection to an Amazon MemoryDB cluster from an EC2 instance using the ValKey client.
- Perform basic data operations such as storing and retrieving key-value pairs using ValKey client commands.
- Enable and describe the high availability features of Amazon MemoryDB that minimize downtime.
- Explain the benefits of using an in-memory database like Amazon MemoryDB in high-performance applications.
- Identify use cases where Amazon MemoryDB can improve application responsiveness and user experience.
Prerequisites
- Familiarity with ValKey or Redis, and in-memory database concepts is recommended. You should also be comfortable using the Linux command line and interacting with AWS services through the AWS Management Console.
Outline
Task 1: Create an Amazon MemoryDB cluster
Task 2: Prepare EC2 Instance for MemoryDB Connection
Task 3: Connect to MemoryDB Cluster from EC2 Instance
Task 4: Perform Basic Data Operations using valkey-cli
Task 5: Configure Cluster for High Availability