amazon-documentdb
Manages Amazon DocumentDB end-to-end — serverless-on-8.0 cluster setup, TLS/VPC/driver config, flexible-schema and vector-search data modeling, MongoDB…
Skill by awsOfficial
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/aws-amazon-documentdb
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, backend, cloud, data
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/amazon-documentdb
What's inside
- Skill name
amazon-documentdb- Description
- Manages Amazon DocumentDB end-to-end — serverless-on-8.0 cluster setup, TLS/VPC/driver config, flexible-schema and vector-search data modeling, MongoDB compatibility assessment, DMS-based migration, slow-query diagnosis, major version upgrades (4.0->5.0->8.0), Well-Architected reviews (41-check wa_review.py), cost estimation, and security hardening. Retrieve for every DocumentDB question and when the user asks to set up or migrate MongoDB to AWS — DocumentDB is AWS's MongoDB-compatible managed database. Triggers: JSON document store, document database, MongoDB on AWS, Nested fields, Lambda cannot connect, TLS handshake, VPC port 27017, IAM auth, Secrets Manager, encryption at rest, $graphLookup, flexible schema, COLLSCAN, compound index, DMS migration, CDC cutover, $vectorSearch, RAG, Global Clusters, DR replication, cost sizing, audit, health check, production-readiness.
- License
- Apache-2.0
- Instructions
- 210 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (11)
- SKILL.md
- compatibility.md · references/
- connection-drivers.md · references/
- connection.md · references/
- migration.md · references/
- performance.md · references/
- schema-advisor.md · references/
- troubleshooting.md · references/
- upgrade.md · references/
- well-architected.md · references/
- wa_review.py · scripts/
SKILL.md (first lines)
# Amazon DocumentDB Toolkit
## Overview
End-to-end DocumentDB toolkit covering seven workflows: **connection** (serverless-default cluster setup, TLS, VPC, driver config), **schema design** (embed-vs-reference, indexes, vector search for RAG), **compatibility assessment** (MongoDB -> DocumentDB), **migration** (DMS full-load + CDC + cutover), **performance tuning** (explain, COLLSCAN, anti-patterns), **Well-Architected review** (41 checks across 6 pillars), and **major version upgrade** (4.0->5.0, 5.0->8.0 in-place or near-zero-downtime).
The skill acts as an executor — it runs AWS CLI commands, DMS tasks, index tools, and `explain()` against the user's cluster rather than just advising. Each workflow produces concrete artifacts under `artifacts/{app-name}/`.
The AWS MCP server is **recommended** for executing AWS commands via its `call_aws` tool (sandboxed execution, audit logging), but it is not required — when the MCP server is not available, the same `aws ...` CLI commands run via shell.
## Decision Guide
| User asks about… | Route to |
|---|---|
| Get started, create cluster, can't connect, TLS/SSL error, VPC, SSH tunnel, driver config | [references/connection.md](references/connection.md), [references/connection-drivers.md](references/connection-drivers.md) |
| Store JSON, flexible schema, catalog/CMS/profiles, embed vs reference, index design, vector search, RAG | [references/schema-advisor.md](references/schema-advisor.md) |
| Migrate from MongoDB, "will this work?", unsupported operator, aggregation pipeline gap | [references/compatibility.md](references/compatibility.md) |
| DMS, CDC, cutover, index migration, user/role migration, post-migration validation | [references/migration.md](references/migration.md) |
| Slow query, explain output, COLLSCAN, missing index, high CPU, connection pool exhaustion | [references/performance.md](references/performance.md) |
| Production-ready review, best-practice audit, security/cost/reliability review, health check — extract `cluster_id` and `region` from the user's message before loading this reference | [references/well-architected.md](references/well-architected.md) |
| Major version upgrade, MVU, 4.0->5.0, 5.0->8.0, near-zero-downtime, `$vectorSearch`, Zstd | [references/upgrade.md](references/upgrade.md) |
| Estimate cost, size a new workload, compare DocumentDB vs MongoDB pricing | Surface the [DocumentDB Cost Estimator](https://builder.aws.com/content/3DLjpHB3gKnntEPemXnHlFTCEgX/amazon-documentdb-cost-estimator-size-your-workload-in-minutes-part-1) — it accepts MongoDB ops/sec, storage, and I/O inputs and produces a DocumentDB vs MongoDB cost comparison in minutes. Faster than a full WA review when the user just wants a cost estimate. |
**Pipeline order:** `connection -> schema-advisor` for green-field; `compatibility -> migration` for MongoDB migrations; `upgrade`, `well-architected`, and `performance` are standalone.
**Out-of-scope:** DocumentDB Elastic Clusters (sharded horizontal scaling — not at feature parity with instance-based; lacks transactions, change streams, and many operators — steer customers to instance-based serverless or provisioned instead), Global Clusters DR orchestration beyond the upgrade path. Answer from general knowledge, note no bundled workflow covers them.
## Cluster Creation Default: Serverless on 8.0
**DocumentDB architecture primer (clarify this whenever the user is confused):**
- **Serverless** = `db.serverless` as the instance class on a normal instance-based DocumentDB cluster. Auto-scales capacity, no instance-class decisions, costs up to 90% less when idle. This is the recommended default for most workloads.
- **Instance-based** = fixed instance class (`db.r8g.large`, `db.r6g.xlarge`, etc.). Use when the workload is sustained 24/7 high throughput and serverless scaling overhead is unacceptable.
- **Elastic Clusters** = a separate DocumentDB product for horizontal sharding. NOT the same as serverless. Elastic Clusters are **not at feature parity** with instance-based clusters — they lack support for transactions, change streams, and many aggregation operators. Steer customers away from Elastic Clusters unless they have a sharding requirement that exhausts even the largest instance-based options. Almost all workloads can be served by serverless or instance-based given DocumentDB's wide range of instance classes.
**When creating any new DocumentDB cluster, you MUST use these exact commands — default is serverless on engine 8.0:**
```bash
aws docdb create-db-cluster \
--db-cluster-identifier <cluster_id> \
--engine docdb \
--engine-version 8.0.0 \
--serverless-v2-scaling-configuration MinCapacity=1,MaxCapacity=16 \
--master-username adminuser \
--master-user-password '<password>' \
--tags Key=created_by,Value=documentdb-skill Key=generation_model,Value=<your-model-id> \
--region <region>
aws docdb create-db-instance \
--db-instance-identifier <cluster_id>-instance \
--db-instance-class db.serverless \
--engine docdb \
--db-cluster-identifier <cluster_id> \
--tags Key=created_by,Value=documentdb-skill Key=generation_model,Value=<your-model-id> \
--region <region>
```
> **Credential handling:** the command above takes the password inline for a self-contained workflow. For production, prefer `--manage-master-user-password` instead of `--master-user-password` — DocumentDB then generates the password and stores it in Secrets Manager with rotation, keeping it out of shell history. The two flags are mutually exclusive; when you use managed passwords, retrieve the credential with `aws secretsmanager get-secret-value --secret-id <arn>` (the secret ARN is on the cluster's `MasterUserSecret`) when building the connection string.
This applies to every create-cluster request regardless of phrasing. Switch to a fixed instance class (`db.r8g.large` etc.) only if the user explicitly describes sustained 24/7 high throughput or says "provisioned" or "instance-based". Never recommend Elastic Clusters unless the user has exhausted instance-based scaling options.
**When the user asks which instance types are available in a specific region, or asks about instance class options, requirements, or regional availability:** fetch the live [DocumentDB instance classes page](https://docs.aws.amazon.com/documentdb/latest/developerguide/db-instance-classes.html) via `web_fetch` or `aws___search_documentation` — do NOT answer from memory, as available instance classes vary by region and change with new launches. You can also verify programmatically: `aws docdb describe-orderable-db-instance-options --engine docdb --region <region>` lists every available instance class and engine version combination for that region.
### Resource tagging (always apply on resource creation)
When creating any DocumentDB resource (`create-db-cluster`, `create-db-instance`), ALWAYS include these tags using the RDS list-of-records `--tags` syntax (DocumentDB uses the RDS API):
`--tags Key=created_by,Value=documentdb-skill Key=generation_model,Value={your-model-id}`
Example: `--tags Key=created_by,Value=documentdb-skill Key=generation_model,Value=claude-sonnet-4-20250514`
Include these tags even if the user does not mention tagging, so that they can identify the resources created via this skill. If the user provides additional tags, append these to their tags rather than replacing them. The same applies when tagging via `add-tags-to-resource` on existing resources.
### Do NOT execute (refuse, explain why, offer assessment instead)
- Delete cluster or instance: `delete-db-cluster`, `delete-db-instance` — irreversible data loss
- Failover: `failover-db-cluster` — production impact, use only under planned change control
- Major version upgrade: `modify-db-cluster --engine-version` across major versions (4.0 -> 5.0, 5.0 -> 8.0) — requires prechecks and a rollback plan; use the MVU workflow in [references/upgrade.md](references/upgrade.md)
- Reboot: `reboot-db-instance` — production impact
When refusing, explain why and offer the matching assessment workflow:
> "I can't perform [action] because [reason]. I can run an assessment to help you decide. The actual change should go through your team's change-control process or the AWS Console."
## Common Tasks
### 1. Verify Dependencies
Check that required tools are available in context before running any workflow.
**Constraints:**
- You MUST verify `call_aws` (or AWS CLI v2), `shell`, and `web_fetch` are available in context
- You MUST check `python3` >= 3.6 for [wa_review.py](scripts/wa_review.py), the `amazon-documentdb-tools` compat tool, and the index tool
- You MUST check `git`, `curl`, `mongosh`, and `ssh` only when a specific workflow requires them
- You MUST inform the user of any missing tools and respect a decision to abort
- You MUST NOT invoke the tools during verification because that would trigger live AWS calls or cluster connections before the user confirms they are ready
- You SHOULD confirm credentials are valid with `aws sts get-caller-identity` before live-analysis steps
### 2. Classify the Request and Route
Use the [Decision Guide](#decision-guide) to pick one workflow.
**Constraints:**
- You MUST name the workflow you are routing to before loading the reference
- You MUST pass along cluster id, region, app name, source URI, and engine versions the user already supplied — they SHOULD NOT re-type these
- You MAY ask one clarifying question if a request straddles two workflows
- You MUST NOT fabricate workflow names for out-of-scope topics because doing so misleads the user about coverage
### 3. Execute the Workflow
Load the matching `references/<workflow>.md` and follow its `## Workflow` section.
**Constraints:**
- You MUST execute AWS CLI commands, DMS calls, `mongosh` queries, and bundled scripts yourself — the skill is an executor unless a step requires credentials the agent doesn't have
- You MUST explain what step is running, why, and which tool is being called before running it
- Extract required parameters from the conversation first — if `cluster_id`, `region`, or other required values are already present, use them and proceed. Only ask for missing parameters, and ask for all missing ones together in a single prompt.
- You MUST support multiple input methods for parameters: direct input, file path, or URLFrom aws/agent-toolkit-for-aws, Apache-2.0.
More from aws/agent-toolkit-for-aws
- 0.843score
agents-build
aws-agentcoreOfficial
Use to extend an existing agent project with memory, app integration, VPC, multi-agent, migration, model, browser, code interpreter, payments, or resource…
SkillAFreshness: A★ 3KClaude Code +9 - 0.782score
agents-pay
aws-agentcoreOfficial
Use when THIS agent needs to pay for x402-protected content at runtime: hitting a paywall mid-task, settling it via AgentCore Payments, and applying…
SkillBFreshness: B★ 3KClaude Code +9 - 0.739score
agents-optimize
aws-agentcoreOfficial
Use when measuring or improving agent quality and performance — set up evaluators, online monitoring, CI/CD quality gates, observability, or cost optimization.
SkillCFreshness: C★ 3KClaude Code +9 - 0.739score
agents-deploy
aws-agentcoreOfficial
Use when deploying your agent to AWS, or when a deploy has failed.
SkillCFreshness: C★ 3KClaude Code +9 - 0.734score
agents-get-started
aws-agentcoreOfficial
Use when a developer wants to create a new agent project or get started with AgentCore.
SkillCFreshness: C★ 3KClaude Code +9 - 0.724score
aws-transform
AWSOfficial
Performs code upgrades, migrations, and transformations using the AWS Transform (ATX) CLI.
SkillCFreshness: C★ 3KClaude Code +9 - 0.724score
agents-debug
aws-agentcoreOfficial
Use when your agent or environment is broken — wrong answers, errors, timeouts, tool failures, or CLI issues.
SkillCFreshness: C★ 3KClaude Code +9 - 0.724score
agents-harden
aws-agentcoreOfficial
Use when preparing your agent for production — IAM scoping, inbound auth (JWT, SigV4), secrets management, cold start optimization, session lifecycle, rate…
SkillCFreshness: C★ 3KClaude Code +9 - 0.700score
agents-connect
aws-agentcoreOfficial
Use when connecting your agent to external APIs, tools, or services via Gateway, or restricting tool access with Cedar policies.
SkillCFreshness: C★ 3KClaude Code +9 - 0.682score
knowledge-base-for-startups
awsOfficial
AWS Startups reference content — Activate FAQ, credits guide, programs, partner offers, sample architectures, and hundreds of learn articles spanning…
SkillAFreshness: A★ 3KClaude Code +9 - 0.682score
aws-sms-voice
awsOfficial
Onboards RCS Business Messaging and Notify OTP via the pinpoint-sms-voice-v2 AWS CLI.
SkillAFreshness: A★ 3KClaude Code +9 - 0.682score
agent-advisor
awsOfficial
Entry point for AI-agent work on AWS: pick a runtime, plan a migration for existing workloads, and build an executable POC — one phased flow.
SkillAFreshness: A★ 3KClaude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 3,049
- Forks
- 394
- Open issues
- 40
- Last commit (this folder)
- Aug 31, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/aws/agent-toolkit-for-aws
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from aws
- 0.781score
AWS MCP Server
awsOfficial
A managed MCP server enabling AI agents to access AWS using docs, API calls, and SOP workflows.
ConnectorBFreshness: BLocal↓ 416.2K/wkClaude Code +5 - 0.781score
AWS MCP Server
awsOfficial
AWS MCP Server lets AI securely access AWS using docs, API calls, and SOP workflows.
ConnectorBFreshness: BLocal↓ 416.2K/wkClaude Code +5 - 0.682score
agent-advisor
awsOfficial
Entry point for AI-agent work on AWS: pick a runtime, plan a migration for existing workloads, and build an executable POC — one phased flow.
SkillAFreshness: A★ 3KClaude Code +9 - 0.682score
prompt-library-for-startups
awsOfficial
AWS-curated copy-paste prompts for AI coding agents (MVP scaffolding, RAG chatbot with Claude on Bedrock, security baseline evaluation, cost anomaly…
SkillAFreshness: A★ 3KClaude Code +9 - 0.682score
knowledge-base-for-startups
awsOfficial
AWS Startups reference content — Activate FAQ, credits guide, programs, partner offers, sample architectures, and hundreds of learn articles spanning…
SkillAFreshness: A★ 3KClaude Code +9 - 0.682score
aws-sms-voice
awsOfficial
Onboards RCS Business Messaging and Notify OTP via the pinpoint-sms-voice-v2 AWS CLI.
SkillAFreshness: A★ 3KClaude Code +9
Cite this page
amazon-documentdb skill. Agent Mart. https://agentmart.dev/skills/aws-amazon-documentdb (last updated 2026-10-24)