Skip to content

DocumentDB

CloudMock emulates Amazon DocumentDB, supporting cluster and instance lifecycle, snapshots, subnet groups, parameter groups, and tagging.

OperationStatusNotes
CreateDBClusterSupportedCreates a DocumentDB cluster
DescribeDBClustersSupportedLists clusters
DeleteDBClusterSupportedDeletes a cluster
ModifyDBClusterSupportedModifies cluster configuration
CreateDBInstanceSupportedCreates an instance in a cluster
DescribeDBInstancesSupportedLists instances
DeleteDBInstanceSupportedDeletes an instance
ModifyDBInstanceSupportedModifies instance configuration
CreateDBClusterSnapshotSupportedCreates a cluster snapshot
DescribeDBClusterSnapshotsSupportedLists cluster snapshots
DeleteDBClusterSnapshotSupportedDeletes a cluster snapshot
CreateDBSubnetGroupSupportedCreates a subnet group
DescribeDBSubnetGroupsSupportedLists subnet groups
DeleteDBSubnetGroupSupportedDeletes a subnet group
CreateDBClusterParameterGroupSupportedCreates a cluster parameter group
DescribeDBClusterParameterGroupsSupportedLists cluster parameter groups
DeleteDBClusterParameterGroupSupportedDeletes a cluster parameter group
AddTagsToResourceSupportedAdds tags to a resource
RemoveTagsFromResourceSupportedRemoves tags from a resource
ListTagsForResourceSupportedLists tags for a resource
import { DocDBClient, CreateDBClusterCommand } from '@aws-sdk/client-docdb';
const client = new DocDBClient({
endpoint: 'http://localhost:4566',
region: 'us-east-1',
credentials: { accessKeyId: 'test', secretAccessKey: 'test' },
});
await client.send(new CreateDBClusterCommand({
DBClusterIdentifier: 'my-docdb-cluster',
Engine: 'docdb',
MasterUsername: 'admin',
MasterUserPassword: 'password123',
}));
import boto3
client = boto3.client('docdb',
endpoint_url='http://localhost:4566',
region_name='us-east-1',
aws_access_key_id='test',
aws_secret_access_key='test')
client.create_db_cluster(
DBClusterIdentifier='my-docdb-cluster',
Engine='docdb',
MasterUsername='admin',
MasterUserPassword='password123')
cloudmock.yml
services:
docdb:
enabled: true
  • No actual MongoDB-compatible database is provisioned
  • Snapshots are metadata-only and cannot be used for restore
  • Connection endpoints are generated but not functional