View a markdown version of this page

Getting started with MemoryDB - Amazon MemoryDB

Getting started with MemoryDB

This exercise leads you through the steps to create, grant access to, connect to, and finally delete a MemoryDB cluster using the MemoryDB Management Console.

Note

For the purposes of this exercise, we recommend you use the Easy create option when creating a cluster and return to the other two options once you have further explored MemoryDB's features.

Step 1: Setting up

Following, you can find topics that describe the one-time actions you must take to start using MemoryDB.

Sign up for an AWS account

To get started with AWS, you need an AWS account. For information about creating an AWS account, see Getting started with an AWS account in the AWS Account Management Reference Guide.

Set up your permissions (new MemoryDB users only)

To provide access, add permissions to your users, groups, or roles:

MemoryDB creates and uses service-linked roles to provision resources and access other AWS resources and services on your behalf. For MemoryDB to create a service-linked role for you, use the AWS-managed policy named AmazonMemoryDBFullAccess. This role comes preprovisioned with permission that the service requires to create a service-linked role on your behalf.

You might decide not to use the default policy and instead to use a custom-managed policy. In this case, make sure that you have either permissions to call iam:createServiceLinkedRole or that you have created the MemoryDB service-linked role.

For more information, see the following:

Step 2: Create a cluster

Before creating a cluster for production use, you obviously need to consider how you will configure the cluster to meet your business needs. Those issues are addressed in the Preparing a cluster section. For the purposes of this Getting Started exercise, you can accept the default configuration values where they apply.

The cluster you create will be live, and not running in a sandbox. You will incur the standard MemoryDB usage fees for the instance until you delete it. The total charges will be minimal (typically less than a dollar) if you complete the exercise described here in one sitting and delete your cluster when you are finished. For more information about MemoryDB usage rates, see MemoryDB.

Your cluster is launched in a virtual private cloud (VPC) based on the Amazon VPC service.

Creating a MemoryDB cluster

The following examples show how to create a cluster using the AWS Management Console, AWS CLI and MemoryDB API.

To create a cluster using the MemoryDB console
  1. Sign in to the AWS Management Console and open the MemoryDB console at https://console.aws.amazon.com/memorydb/.

  2. Choose Clusters In the left navigation pane and then choose Create.

Easy create
  1. Complete the Configuration section. This configures the node type and default configuration of your cluster. Select the appropriate memory size and network performance you require from the following options:

    • Production

    • Dev/Test

    • Demo

  2. Complete the Cluster info section.

    1. In Name, enter a name for your cluster.

      Cluster naming constraints are as follows:

      • Must contain 1–40 alphanumeric characters or hyphens.

      • Must begin with a letter.

      • Can't contain two consecutive hyphens.

      • Can't end with a hyphen.

    2. In the Description box, enter a description for this cluster.

  3. Complete the Subnet groups section:

    1. For Subnet groups, create a new subnet group or choose an existing one from the available list that you want to apply to this cluster. If you are creating a new one:

      • Enter a Name

      • Enter a Description

      • If you enabled Multi-AZ, the subnet group must contain at least two subnets that reside in different availability zones. For more information, see Subnets and subnet groups.

      • If you are creating a new subnet group and do not have an existing VPC, you will be asked to create a VPC. For more information, see What is Amazon VPC? in the Amazon VPC User Guide.

  4. For Vector search, you can Enable Vector search capability to store vector embeddings and perform vector searches. Note that this will fix the values for engine version compatibility, Parameter groups and Shards. For more information, see Vector search.

  5. View default settings:

    When using Easy create, the remaining cluster settings are set by default. Note that some of these settings can be changed after creation, as indicated by Editable after creation.

  6. For Tags, you can optionally apply tags to search and filter your clusters or track your AWS costs.

  7. Review all your entries and choices, then make any needed corrections. When you're ready, choose Create to launch your cluster, or Cancel to cancel the operation.

As soon as your cluster's status is available, you can grant EC2 access to it, connect to it, and begin using it. For more information, see Step 3: Authorize access to the cluster

Important

As soon as your cluster becomes available, you're billed for each hour or partial hour that the cluster is active, even if you're not actively using it. To stop incurring charges for this cluster, you must delete it. See Step 5: Deleting a cluster.

Create new cluster
  1. Complete the Cluster info section.

    1. In Name, enter a name for your cluster.

      Cluster naming constraints are as follows:

      • Must contain 1–40 alphanumeric characters or hyphens.

      • Must begin with a letter.

      • Can't contain two consecutive hyphens.

      • Can't end with a hyphen.

    2. In the Description box, enter a description for this cluster.

  2. Complete the Subnet groups section:

    1. For Subnet groups, create a new subnet group or choose an existing one from the available list that you want to apply to this cluster. If you are creating a new one:

      • Enter a Name

      • Enter a Description

      • If you enabled Multi-AZ, the subnet group must contain at least two subnets that reside in different availability zones. For more information, see Subnets and subnet groups.

      • If you are creating a new subnet group and do not have an existing VPC, you will be asked to create a VPC. For more information, see What is Amazon VPC? in the Amazon VPC User Guide.

  3. Complete the Cluster settings section: