DocsAWS 101BlogServices

Amazon DocumentDB

Amazon DocumentDB — the docdb control plane for clusters and instances, each cluster backed by a real documentdb-local container speaking the MongoDB protocol over TLS.

Query (form-encoded) multi-tenant 15 operations

Quick start

import boto3
docdb = boto3.client("docdb", endpoint_url="http://localhost:4566",
                     region_name="us-east-1",
                     aws_access_key_id="test", aws_secret_access_key="test")
docdb.create_db_cluster(DBClusterIdentifier="docs", Engine="docdb",
    MasterUsername="admin", MasterUserPassword="pw123456")
docdb.create_db_instance(DBInstanceIdentifier="docs-1",
    DBClusterIdentifier="docs", Engine="docdb",
    DBInstanceClass="db.r6g.large")

Supported operations

15 operations exposed by this service as of MiniStack 1.5.32. Extracted directly from the handler dispatch in the source module.

AddTagsToResource CreateDBCluster CreateDBInstance DeleteDBCluster DeleteDBInstance DescribeDBClusters DescribeDBInstances FailoverDBCluster ListTagsForResource ModifyDBCluster ModifyDBInstance RebootDBInstance RemoveTagsFromResource StartDBCluster StopDBCluster

CloudFormation

The CloudFormation engine provisions these resource types via this service:

AWS::DocDB::DBCluster AWS::DocDB::DBClusterParameterGroup AWS::DocDB::DBInstance AWS::DocDB::DBSubnetGroup

See CloudFormation engine for intrinsic support and lifecycle details.

Known limitations

  • Host ports are allocated from DOCDB_BASE_PORT (default 27117); DOCDB_PERSIST keeps data in a Docker volume and DOCDB_TMPFS_SIZE sizes the in-memory data directory otherwise.
  • Subnet and parameter groups are shared with RDS, and an unfiltered DescribeDBClusters or DescribeDBInstances lists RDS and DocumentDB together, as on AWS.
  • Snapshots, global clusters, event subscriptions and the other docdb operations not listed above are not implemented.

Source

  • ministack/services/documentdb.py

Read the source to verify the ops list above — dispatch tables and handler functions are the ground truth.