Describing Amazon DocumentDB Instances

You can use either the Amazon DocumentDB Management Console or the AWS CLI to see details such as connection endpoints, security groups VPCs, certificate authority, and parameter groups pertaining to your Amazon DocumentDB instances.

Using the AWS Management Console

To view the details of your instances using the AWS Management Console, follow the steps below.

  1. Sign in to the AWS Management Console, and open the Amazon DocumentDB console at https://console.aws.amazon.com/docdb.

  2. In the navigation pane, choose Clusters .

    Tip

    If you don’t see the navigation pane on the left side of your screen, choose the menu icon (Describing Instances - 图1) in the upper-left corner of the page.

  3. In the Clusters navigation box, you’ll see the column Cluster Identifier. Your instances are listed under clusters, similar to the screenshot below.

    Describing Instances - 图2

  4. In the list of instances, choose the name of the instance that you want to see its details. The information about the instance is organized into the following groupings:

    • Summary—General information about the instance, including the engine version, class, status, and any pending maintenance.

    • Connectivity & Security —The Connect section lists the connection endpoints to connect to this instance with the mongo shell or with an application. The Security Groups section lists the security groups associated with this instance and their VPC ID and descriptions.

    • Configuration—The Details section lists the configurations and status of the instance, including the instance’s Amazon Resource Name (ARN), endpoint, role, class, and certificate authority. It also lists the instance’s security and network settings, and backup information. The Cluster details section lists the details of the cluster that this instance belongs to. The Cluster instances section lists all the instances that belong to your cluster with each instance’s role and cluster parameter group status.

      Note

      You can modify the cluster associated with your instance by selecting Modify next to the Cluster details header. For more information, see Modifying an Amazon DocumentDB Cluster.

    • Monitoring—The CloudWatch Logs metrics for this instance. For more information, see Monitoring Amazon DocumentDB with CloudWatch.

    • Events & tags —The Recent events section lists the recent events for this instance. Amazon DocumentDB keeps a record of events that relate to your clusters, instances, snapshots, security groups, and cluster parameter groups. This information includes the date, time, and message associated with each event. The section lists the tags attached to this cluster. For more information, see Tagging Amazon DocumentDB Resources.

Using the AWS CLI

To view the details of your Amazon DocumentDB instances using the AWS CLI, use the describe-db-clusters command as shown in the examples below. For more information, see DescribeDBInstances in the Amazon DocumentDB Resource Management API Reference.

Note

For certain management features such as cluster and instance lifecycle management, Amazon DocumentDB leverages operational technology that is shared with Amazon RDS. The filterName=engine,Values=docdb filter parameter returns only Amazon DocumentDB clusters.

  1. List all Amazon DocumentDB instances.

    The following AWS CLI code lists the details for all Amazon DocumentDB instances in a region.

    For Linux, macOS, or Unix:

    1. aws docdb describe-db-instances \
    2. --filter Name=engine,Values=docdb

    For Windows:

    1. aws docdb describe-db-instances \
    2. --filter Name=engine,Values=docdb
  2. List all details for a specified Amazon DocumentDB instance

    The following code lists the details for sample-cluster-instance. Including the --db-instance-identifier parameter with the name of an instance restricts the output to information on that particular instance.

    For Linux, macOS, or Unix:

    1. aws docdb describe-db-instances \
    2. --db-instance-identifier sample-cluster-instance

    For Windows:

    1. aws docdb describe-db-instances \
    2. --db-instance-identifier sample-cluster-instance

    Output from this operation looks like the following.

    1. {
    2. "DBInstances": [
    3. {
    4. "DbiResourceId": "db-BJKKB54PIDV5QFKGVRX5T3S6GM",
    5. "DBInstanceArn": "arn:aws:rds:us-east-1:012345678901:db:sample-cluster-instance-00",
    6. "VpcSecurityGroups": [
    7. {
    8. "VpcSecurityGroupId": "sg-77186e0d",
    9. "Status": "active"
    10. }
    11. ],
    12. "DBInstanceClass": "db.r5.large",
    13. "DBInstanceStatus": "creating",
    14. "AutoMinorVersionUpgrade": true,
    15. "PreferredMaintenanceWindow": "fri:09:32-fri:10:02",
    16. "BackupRetentionPeriod": 1,
    17. "StorageEncrypted": true,
    18. "DBClusterIdentifier": "sample-cluster",
    19. "EngineVersion": "3.6.0",
    20. "AvailabilityZone": "us-east-1a",
    21. "Engine": "docdb",
    22. "PromotionTier": 2,
    23. "DBInstanceIdentifier": "sample-cluster-instance",
    24. "PreferredBackupWindow": "00:00-00:30",
    25. "PubliclyAccessible": false,
    26. "DBSubnetGroup": {
    27. "DBSubnetGroupName": "default",
    28. "Subnets": [
    29. {
    30. "SubnetIdentifier": "subnet-4e26d263",
    31. "SubnetAvailabilityZone": {
    32. "Name": "us-east-1a"
    33. },
    34. "SubnetStatus": "Active"
    35. },
    36. {
    37. "SubnetIdentifier": "subnet-afc329f4",
    38. "SubnetAvailabilityZone": {
    39. "Name": "us-east-1c"
    40. },
    41. "SubnetStatus": "Active"
    42. },
    43. {
    44. "SubnetIdentifier": "subnet-b3806e8f",
    45. "SubnetAvailabilityZone": {
    46. "Name": "us-east-1e"
    47. },
    48. "SubnetStatus": "Active"
    49. },
    50. {
    51. "SubnetIdentifier": "subnet-53ab3636",
    52. "SubnetAvailabilityZone": {
    53. "Name": "us-east-1d"
    54. },
    55. "SubnetStatus": "Active"
    56. },
    57. {
    58. "SubnetIdentifier": "subnet-991cb8d0",
    59. "SubnetAvailabilityZone": {
    60. "Name": "us-east-1b"
    61. },
    62. "SubnetStatus": "Active"
    63. },
    64. {
    65. "SubnetIdentifier": "subnet-29ab1025",
    66. "SubnetAvailabilityZone": {
    67. "Name": "us-east-1f"
    68. },
    69. "SubnetStatus": "Active"
    70. }
    71. ],
    72. "VpcId": "vpc-91280df6",
    73. "DBSubnetGroupDescription": "default",
    74. "SubnetGroupStatus": "Complete"
    75. },
    76. "PendingModifiedValues": {},
    77. "KmsKeyId": "arn:aws:kms:us-east-1:012345678901:key/0961325d-a50b-44d4-b6a0-a177d5ff730b"
    78. }
    79. ]
    80. }