Amazon DocumentDB Quotas and Limits - Amazon DocumentDB

Amazon DocumentDB Quotas and Limits

This topic describes the resource quotas, limits, and naming constraints for Amazon DocumentDB (with MongoDB compatibility).

For certain management features, Amazon DocumentDB uses operational technology that is shared with Amazon Relational Database Service (Amazon RDS) and Amazon Neptune.

Supported Instance Types

Amazon DocumentDB supports on-demand instances and the following instance types:

  • Memory Optimized:

    • R6G instance types: db.r6g.large, db.r6g.2xlarge, db.r6g.4xlarge, db.r6g.8xlarge, db.r6g.12xlarge, db.r6g.16xlarge.

    • R5 instance types: db.r5.large, db.r5.2xlarge, db.r5.4xlarge, db.r5.8xlarge, db.r5.12xlarge, db.r5.16xlarge db.r5.24xlarge.

    • R4 instance types: db.r4.large, db.r4.2xlarge, db.r4.4xlarge, db.r4.8xlarge, db.r4.16xlarge.

  • Burstable Performance:

    • T4G instance types: db.t4g.medium.

    • T3 instance types: db.t3.medium.

For more information on the supported instance types and their specifications, see Instance Class Specifications.

Supported Regions

Amazon DocumentDB is available in the following AWS regions:

Region Name Region Availability Zones (compute)

US East (Ohio)

us-east-2

3

US East (N. Virginia)

us-east-1

6

US West (Oregon)

us-west-2

4

South America (São Paulo)

sa-east-1

3

Asia Pacific (Mumbai)

ap-south-1

3

Asia Pacific (Seoul)

ap-northeast-2

4

Asia Pacific (Singapore)

ap-southeast-1

3

Asia Pacific (Sydney)

ap-southeast-2

3

Asia Pacific (Tokyo)

ap-northeast-1

3

Canada (Central)

ca-central-1

3

China (Ningxia)

cn-northwest-1

3

Europe (Frankfurt)

eu-central-1

3

Europe (Ireland)

eu-west-1

3

Europe (London)

eu-west-2

3

Europe (Paris)

eu-west-3

3

AWS GovCloud (US)

us-gov-west-1

3

Regional Quotas

For certain management features, Amazon DocumentDB uses operational technology that is shared with Amazon Relational Database Service (Amazon RDS) and Amazon Neptune. The following table contains regional limits that are shared among Amazon DocumentDB, Amazon RDS, and Neptune.

The following limits are per AWS account per region.

Resource AWS Default Limit
Clusters 40
Cluster parameter groups 50
Event subscriptions 20
Instances 40
Manual cluster snapshots 100
Read replicas per cluster 15
Subnet groups 50
Subnets per subnet group 20
Tags per resource 50
VPC security groups per instance 5

You can use Service Quotas to request an increase for a quota, if the quota is adjustable. Some requests are automatically resolved, while others are submitted to AWS Support. You can track the status of a quota increase request that is submitted to AWS Support. Requests to increase service quotas do not receive priority support. If you have an urgent request, please contact AWS Support. For more information on Service Quotas, see What Is Service Quotas?

To request a quota increase for Amazon DocumentDB:

  1. Open the Service Quotas console at https://console.aws.amazon.com/servicequotas and, if necessary, sign in.

  2. In the navigation pane, choose AWS services.

  3. Select Amazon DocumentDB from the list, or type Amazon DocumentDB in the search field.

  4. If the quota is adjustable, you can select its radio button or its name, and then choose Request quota increase from the top right of the page.

  5. For Change quota value, enter the new value. The new value must be greater than the current value.

  6. Choose Request. After the request is resolved, the Applied quota value for the quota is set to the new value.

  7. To view any pending or recently resolved requests, choose Dashboard from the navigation pane. For pending requests, choose the status of the request to open the request receipt. The initial status of a request is Pending. After the status changes to Quota requested, you'll see the case number with AWS Support. Choose the case number to open the ticket for your request.

Aggregation Limits

The following table describes aggregation limits in Amazon DocumentDB.

Resource Limit
Maximum number of supported stages 500

Cluster Limits

The following table describes Amazon DocumentDB cluster limits.

Resource Limit
Cluster size (sum of all collections and indexes) 64 TB
Collection size
 (sum of all collections can't exceed cluster limit) – does not include the index size 32 TB
Collections per cluster 100,000
Databases per cluster 100,000
Database size (sum of all databases can't exceed cluster limit) 64 TB
Document nesting depth 100 levels
Document size 16 MB
Index key size 2,048 bytes
Indexes per collection 64
Keys in a compound index 32
Maximum number of writes in a single batch command 100,000
Number of users per cluster 1000

Instance Limits

The following table describes Amazon DocumentDB limits per instance.

Instance Type Instance Memory (GiB) Connection Limit Cursor Limit (per minute) Open Transaction Limit (per minute)
T3.medium 4 500 30 50
T4G.medium 4 500 30 50
R4.large 15.25 1700 450 N/A
R4.xlarge 30.5 3400 450 N/A
R4.2xlarge 61 6800 450 N/A
R4.4xlarge 122 13600 725 N/A
R4.8xlarge 288 27200 1450 N/A
R4.16xlarge 488 30000 2900 N/A
R5.large 16 1700 450 200
R5.xlarge 32 3500 450 400
R5.2xlarge 64 7100 450 800
R5.4xlarge 128 14200 760 1600
R5.8xlarge 256 28400 1520 3200
R5.12xlarge 383 30000 2280 4800
R5.16xlarge 512 30000 3040 6400
R5.24xlarge 768 30000 4560 9600
R6G.large 16 1700 450 200
R6G.xlarge 32 3500 450 400
R6G.2xlarge 64 7100 450 800
R6G.4xlarge 128 14200 760 1600
R6G.8xlarge 256 28400 1520 3200
R6G.12xlarge 383 30000 2280 4800
R6G.16xlarge 512 30000 3040 6400

You can monitor and alarm on the per instance limits using the following the following CloudWatch metrics. For more on Amazon DocumentDB CloudWatch metrics, see Monitoring Amazon DocumentDB with CloudWatch.

Limit CloudWatch Metrics
Instance Memory FreeableMemory
Connections DatabaseConnectionsMax
Cursors DatabaseCursorsMax
Transactions TransactionsOpenMax

Naming Constraints

The following table describes naming constraints in Amazon DocumentDB.

Resource Default Limit
Cluster identifier
  • Length is [1–63] letters, numbers, or hyphens.

  • First character must be a letter.

  • Cannot end with a hyphen or contain two consecutive hyphens.

  • Must be unique for all clusters (across Amazon RDS, Amazon Neptune, and Amazon DocumentDB) per AWS account, per Region.

Collection name: <col>

Length is [1–57] characters.

Database name: <db>

Length is [1–63] characters.

Fully qualified collection name: <db>.<col> Length is [3–120] characters.
Fully qualified index name: <db>.<col>.$<index> Length is [6–127] characters.
Index name: <col>$<index>

Length is [3–63] characters.

Instance identifier
  • Length is [1–63] letters, numbers, or hyphens

  • First character must be a letter

  • Cannot end with a hyphen or contain two consecutive hyphens

  • Must be unique for all instances (across Amazon RDS, Amazon Neptune, and Amazon DocumentDB) per AWS account, per Region.

Master password
  • Length is [8-100] printable ASCII characters.

  • Can use any printable ASCII characters except for the following:

    • / (forward slash)

    • " (double quotation mark)

    • @ (at symbol)

Master user name
  • Length is [1-63] alphanumeric characters.

  • First character must be a letter.

  • Cannot be a word reserved by the database engine.

Parameter group name
  • Length is [1–255] alphanumeric characters.

  • First character must be a letter.

  • Cannot end with a hyphen or contain two consecutive hyphens.

TTL Constraints

Deletes from a TTL index are not guaranteed within a specific timeframe and are best effort. Factors like instance resource utilization, document size, and overall throughput can affect the timing of a TTL delete.