CreateCluster - Amazon MemoryDB

CreateCluster

Creates a cluster. All nodes in the cluster run the same protocol-compliant engine software.

Request Syntax

{ "ACLName": "string", "AutoMinorVersionUpgrade": boolean, "ClusterName": "string", "DataTiering": boolean, "Description": "string", "Engine": "string", "EngineVersion": "string", "KmsKeyId": "string", "MaintenanceWindow": "string", "NodeType": "string", "NumReplicasPerShard": number, "NumShards": number, "ParameterGroupName": "string", "Port": number, "SecurityGroupIds": [ "string" ], "SnapshotArns": [ "string" ], "SnapshotName": "string", "SnapshotRetentionLimit": number, "SnapshotWindow": "string", "SnsTopicArn": "string", "SubnetGroupName": "string", "Tags": [ { "Key": "string", "Value": "string" } ], "TLSEnabled": boolean }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

ACLName

The name of the Access Control List to associate with the cluster.

Type: String

Length Constraints: Minimum length of 1.

Pattern: [a-zA-Z][a-zA-Z0-9\-]*

Required: Yes

AutoMinorVersionUpgrade

When set to true, the cluster will automatically receive minor engine version upgrades after launch.

Type: Boolean

Required: No

ClusterName

The name of the cluster. This value must be unique as it also serves as the cluster identifier.

Type: String

Required: Yes

DataTiering

Enables data tiering. Data tiering is only supported for clusters using the r6gd node type. This parameter must be set when using r6gd nodes. For more information, see Data tiering.

Type: Boolean

Required: No

Description

An optional description of the cluster.

Type: String

Required: No

Engine

The name of the engine to be used for the nodes in this cluster. The value must be set to either redis or valkey, and is required when using Valkey.

Type: String

Required: No

EngineVersion

The version number of the engine to be used for the cluster.

Type: String

Required: No

KmsKeyId

The ID of the KMS key used to encrypt the cluster.

Type: String

Required: No

MaintenanceWindow

Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period.

Valid values for ddd are:

  • sun

  • mon

  • tue

  • wed

  • thu

  • fri

  • sat

Example: sun:23:00-mon:01:30

Type: String

Required: No

NodeType

The compute and memory capacity of the nodes in the cluster.

Type: String

Required: Yes

NumReplicasPerShard

The number of replicas to apply to each shard. The default value is 1. The maximum is 5.

Type: Integer

Required: No

NumShards

The number of shards the cluster will contain. The default value is 1.

Type: Integer

Required: No

ParameterGroupName

The name of the parameter group associated with the cluster.

Type: String

Required: No

Port

The port number on which each of the nodes accepts connections.

Type: Integer

Required: No

SecurityGroupIds

A list of security group names to associate with this cluster.

Type: Array of strings

Required: No

SnapshotArns

A list of Amazon Resource Names (ARN) that uniquely identify the RDB snapshot files stored in Amazon S3. The snapshot files are used to populate the new cluster. The Amazon S3 object name in the ARN cannot contain any commas.

Type: Array of strings

Required: No

SnapshotName

The name of a snapshot from which to restore data into the new cluster. The snapshot status changes to restoring while the new cluster is being created.

Type: String

Required: No

SnapshotRetentionLimit

The number of days for which MemoryDB retains automatic snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot that was taken today is retained for 5 days before being deleted.

Type: Integer

Required: No

SnapshotWindow

The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard.

Example: 05:00-09:00

If you do not specify this parameter, MemoryDB automatically chooses an appropriate time range.

Type: String

Required: No

SnsTopicArn

The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent.

Type: String

Required: No

SubnetGroupName

The name of the subnet group to be used for the cluster.

Type: String

Required: No

Tags

A list of tags to be added to this resource. Tags are comma-separated key,value pairs (e.g. Key=myKey, Value=myKeyValue. You can include multiple tags as shown following: Key=myKey, Value=myKeyValue Key=mySecondKey, Value=mySecondKeyValue.

Type: Array of Tag objects

Array Members: Maximum number of 200 items.

Required: No

TLSEnabled

A flag to enable in-transit encryption on the cluster.

Type: Boolean

Required: No

Response Syntax

{ "Cluster": { "ACLName": "string", "ARN": "string", "AutoMinorVersionUpgrade": boolean, "AvailabilityMode": "string", "ClusterEndpoint": { "Address": "string", "Port": number }, "DataTiering": "string", "Description": "string", "Engine": "string", "EnginePatchVersion": "string", "EngineVersion": "string", "KmsKeyId": "string", "MaintenanceWindow": "string", "Name": "string", "NodeType": "string", "NumberOfShards": number, "ParameterGroupName": "string", "ParameterGroupStatus": "string", "PendingUpdates": { "ACLs": { "ACLToApply": "string" }, "Resharding": { "SlotMigration": { "ProgressPercentage": number } }, "ServiceUpdates": [ { "ServiceUpdateName": "string", "Status": "string" } ] }, "SecurityGroups": [ { "SecurityGroupId": "string", "Status": "string" } ], "Shards": [ { "Name": "string", "Nodes": [ { "AvailabilityZone": "string", "CreateTime": number, "Endpoint": { "Address": "string", "Port": number }, "Name": "string", "Status": "string" } ], "NumberOfNodes": number, "Slots": "string", "Status": "string" } ], "SnapshotRetentionLimit": number, "SnapshotWindow": "string", "SnsTopicArn": "string", "SnsTopicStatus": "string", "Status": "string", "SubnetGroupName": "string", "TLSEnabled": boolean } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Cluster

The newly-created cluster.

Type: Cluster object

Errors

For information about the errors that are common to all actions, see Common Errors.

ACLNotFoundFault

HTTP Status Code: 400

ClusterAlreadyExistsFault

HTTP Status Code: 400

ClusterQuotaForCustomerExceededFault

HTTP Status Code: 400

InsufficientClusterCapacityFault

HTTP Status Code: 400

InvalidACLStateFault

HTTP Status Code: 400

InvalidCredentialsException

HTTP Status Code: 400

InvalidParameterCombinationException

HTTP Status Code: 400

InvalidParameterValueException

HTTP Status Code: 400

InvalidVPCNetworkStateFault

HTTP Status Code: 400

NodeQuotaForClusterExceededFault

HTTP Status Code: 400

NodeQuotaForCustomerExceededFault

HTTP Status Code: 400

ParameterGroupNotFoundFault

HTTP Status Code: 400

ServiceLinkedRoleNotFoundFault

HTTP Status Code: 400

ShardsPerClusterQuotaExceededFault

HTTP Status Code: 400

SubnetGroupNotFoundFault

HTTP Status Code: 400

TagQuotaPerResourceExceeded

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: