Understanding Amazon DocumentDB Amazon Resource Names (ARNs)
Resources that you create in AWS are each uniquely identified with an Amazon Resource Name (ARN). For certain Amazon DocumentDB (with MongoDB compatibility) operations, you must uniquely identify an Amazon DocumentDB resource by specifying its ARN. For example, when you add a tag to a resource, you must provide the resource's ARN.
Constructing an ARN for an Amazon DocumentDB resource
You can construct an ARN for an Amazon DocumentDB resource using the following syntax. Amazon DocumentDB
shares the format of Amazon Relational Database Service (Amazon RDS) ARNs. Amazon DocumentDB ARNs
contain rds and not docdb.
arn:aws:rds:region:account_number:resource_type:resource_id
| Region Name | Region | Availability Zones (compute) |
|---|---|---|
US East (Ohio) |
|
3 |
US East (N. Virginia) |
|
6 |
US West (Oregon) |
|
4 |
Africa (Cape Town) |
|
3 |
South America (São Paulo) |
|
3 |
Asia Pacific (Hong Kong) |
|
3 |
Asia Pacific (Taipei) |
|
3 |
Asia Pacific (Hyderabad) |
|
3 |
Asia Pacific (Malaysia) |
|
3 |
Asia Pacific (Mumbai) |
|
3 |
Asia Pacific (Osaka) |
|
3 |
Asia Pacific (Seoul) |
|
4 |
Asia Pacific (Singapore) |
|
3 |
Asia Pacific (Sydney) |
|
3 |
Asia Pacific (Jakarta) |
|
3 |
Asia Pacific (Melbourne) |
|
3 |
Asia Pacific (New Zealand) |
|
3 |
Asia Pacific (Thailand) |
|
3 |
Asia Pacific (Tokyo) |
|
3 |
Canada (Central) |
|
3 |
Canada West (Calgary) |
|
3 |
China (Beijing) Region |
|
3 |
China (Ningxia) |
|
3 |
Europe (Frankfurt) |
|
3 |
Europe (Zurich) |
|
3 |
Europe (Ireland) |
|
3 |
Europe (London) |
|
3 |
Europe (Milan) |
|
3 |
Europe (Paris) |
|
3 |
Europe (Spain) |
|
3 |
Europe (Stockholm) |
|
3 |
Mexico (Central) |
|
3 |
Middle East (UAE) |
|
3 |
Israel (Tel Aviv) |
|
3 |
| AWS GovCloud (US-West) |
|
3 |
| AWS GovCloud (US-East) |
|
3 |
Note
The Amazon DocumentDB architecture separates storage and compute. For the storage layer, Amazon DocumentDB replicates six copies of your data across three AWS Availability Zones (AZs). The AZs listed in the table above are the number of AZs that you can use in a given Region to provision compute instances. As an example, if you are launching an Amazon DocumentDB cluster in ap-northeast-1, your storage will be replicated six ways across three AZs but your compute instances will only be available in two AZs.
The following table shows the format that you should use when constructing an ARN for a particular Amazon DocumentDB resource. Amazon DocumentDB shares the format of
Amazon RDS ARNs. Amazon DocumentDB ARNs contain rds and not docdb.
| Resource Type | ARN Format / Example |
|---|---|
|
Instance ( |
|
|
Cluster ( |
|
|
Cluster parameter group ( |
|
|
Security group ( |
|
|
Cluster snapshot ( |
|
|
Subnet group ( |
|
Note
Each Amazon DocumentDB cluster also has a cluster resource ID, which is the value of the DbClusterResourceId
field (for example, cluster-ABCDEFGHIJKLMNOPQRSTUVWXYZ). Unlike the cluster identifier, the cluster
resource ID doesn't change if you rename the cluster. The cluster ARN that Amazon DocumentDB API operations return, such as
DBClusterArn in the output of describe-db-clusters, uses the cluster identifier. Use that ARN
when you call Amazon DocumentDB API operations.
In billing data, such as AWS Cost Explorer and the AWS Cost and Usage Report, charges for a cluster can appear
under an ARN that uses the cluster resource ID in lowercase, for example
arn:aws:rds:us-east-1:123456789012:cluster:cluster-abcdefghijklmnopqrstuvwxyz. To find the cluster that
the ARN refers to, list the identifier and resource ID of each of your clusters, and then match the resource ID without
regard to case:
aws docdb describe-db-clusters \ --filter Name=engine,Values=docdb \ --query "DBClusters[*].[DBClusterIdentifier,DbClusterResourceId]" \ --output table
Finding an Amazon DocumentDB resource ARN
You can find the ARN of an Amazon DocumentDB resource using the AWS Management Console or the AWS CLI.