amazon-documentdb

Manages Amazon DocumentDB clusters, migrations, upgrades, and performance tuning end-to-end.

2.5k|282|Updated Apr 23, 2026
One-click install
npx skills add https://github.com/aws/agent-toolkit-for-aws --skill amazon-documentdb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: amazon-documentdb
Source: https://github.com/aws/agent-toolkit-for-aws/tree/main/skills/specialized-skills/database-skills/amazon-documentdb
Command: npx skills add https://github.com/aws/agent-toolkit-for-aws --skill amazon-documentdb

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires boto3, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Setting up, migrating to, and operating Amazon DocumentDB involves many error-prone details — TLS and VPC configuration, MongoDB compatibility gaps, DMS migration orchestration, index design, and major version upgrades — that commonly cause production incidents when handled from generic MongoDB knowledge alone.

Core Features & Use Cases

  • Cluster setup and connectivity: Creates serverless DocumentDB 8.0 clusters with correct TLS, VPC security group, and driver configuration for Python, Node.js, Java, Go, C#, and Ruby.
  • MongoDB migration: Runs compatibility assessment with the amazon-documentdb-tools compat tool, migrates indexes, and orchestrates DMS full-load-plus-CDC migrations with cutover checklists.
  • Performance and operations: Diagnoses slow queries via explain() and COLLSCAN analysis, designs flexible schemas with vector search for RAG workloads, runs a 41-check Well-Architected review, and executes major version upgrades (4.0 to 5.0 to 8.0).
  • Use Case: A team migrating a MongoDB product catalog to AWS asks for help — the skill assesses operator compatibility, pre-creates indexes, configures DMS endpoints with verify-full TLS, monitors CDC lag, and produces a migration plan artifact.

Quick Start

Ask the agent to create a new Amazon DocumentDB serverless cluster in your region and generate a working connection string for your application.

Frequently Asked Questions about amazon-documentdb

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate MongoDB to Amazon DocumentDB?

Run the compatibility assessor from amazon-documentdb-tools first to find unsupported operators, then pre-create indexes with the index tool, and use AWS DMS with a full-load-and-cdc task for near-zero-downtime cutover. The target endpoint must use ssl-mode verify-full with the RDS global bundle certificate.

How do I connect to Amazon DocumentDB from a Lambda function?

Lambda must run in the same VPC as the DocumentDB cluster, with an inbound TCP 27017 rule on the DocumentDB security group sourced from Lambda's security group. The connection string needs tls=true with the RDS global CA bundle, replicaSet=rs0, and retryWrites=false.

Does Amazon DocumentDB support $graphLookup and wildcard indexes?

Support varies by engine version, so check the MongoDB API compatibility page before relying on them. If unsupported, use the materialized ancestor path pattern for hierarchies and targeted compound indexes instead of wildcard indexes.

Why does my DocumentDB query show COLLSCAN and run slowly?

COLLSCAN means no index serves the query. Create a compound index following the ESR rule (equality fields first, then sort, then range), remembering DocumentDB uses left-prefix matching, then re-run explain() to confirm the stage changed to IXSCAN.

Can I upgrade DocumentDB 4.0 directly to 8.0?

No, DocumentDB cannot skip major versions — you must upgrade 4.0 to 5.0 first, then 5.0 to 8.0. Each upgrade requires the --allow-major-version-upgrade flag and, with custom parameter groups, a new parameter group for the target engine family.

What are the limitations of DocumentDB Elastic Clusters?

Elastic Clusters lack transactions, change streams, and many aggregation operators compared to instance-based clusters. Most workloads should use serverless or provisioned instance-based clusters instead, reserving Elastic Clusters for sharding needs that exceed instance-based scaling.