From databases-on-aws
Manage schemas, execute queries via MCP tools, handle migrations, and build apps with Aurora DSQL serverless PostgreSQL-compatible database. Covers IAM auth and multi-tenant patterns.
npx claudepluginhub awslabs/agent-plugins --plugin databases-on-awsThis skill uses the workspace's default tool permissions.
Aurora DSQL is a serverless, PostgreSQL-compatible distributed SQL database. This skill provides direct database interaction via MCP tools, schema management, migration support, and multi-tenant patterns.
mcp/mcp-setup.mdmcp/mcp-tools.mdmcp/platforms/claude-code.mdmcp/platforms/codex.mdmcp/platforms/gemini.mdmcp/tools/database-tools.mdmcp/tools/documentation-tools.mdmcp/tools/input-validation.mdmcp/tools/workflow-patterns.mdreferences/access-control.mdreferences/auth/authentication-guide.mdreferences/auth/connectivity-tools.mdreferences/auth/scaling-guide.mdreferences/ddl-migrations/batched-migration.mdreferences/ddl-migrations/column-operations.mdreferences/ddl-migrations/constraint-operations.mdreferences/ddl-migrations/overview.mdreferences/development-guide.mdreferences/dsql-examples.mdreferences/examples/connection.mdGuides Cloudflare D1 serverless SQLite usage: databases, migrations, bindings, queries, read replicas, Sessions API, and fixes D1_ERROR, statement too long errors.
Guides Cloudflare D1 migrations with Drizzle: generate SQL, inspect for destructive changes, apply local/remote, verify schemas, fix stuck migrations and partial failures.
Databricks Lakebase Postgres: projects, scaling, connectivity, Lakebase synced tables, and Data API. Use when asked about Lakebase databases, OLTP storage, or connecting apps to Postgres on Databricks.
Share bugs, ideas, or general feedback.
Aurora DSQL is a serverless, PostgreSQL-compatible distributed SQL database. This skill provides direct database interaction via MCP tools, schema management, migration support, and multi-tenant patterns.
Key capabilities:
Load these files as needed for detailed guidance:
When: ALWAYS load before implementing schema changes or database operations Contains: Best Practices, DDL rules, connection patterns, transaction limits, data type serialization patterns, application-layer referential integrity instructions, security best practices
When: Always load for guidance using or updating the DSQL MCP server Contains: Instructions for setting up the DSQL MCP server with 2 configuration options as sampled in .mcp.json
When: Load when you need detailed MCP tool syntax and examples. PREFER MCP tools for ad-hoc queries — execute directly rather than writing scripts. Contains: Tool parameters, detailed examples, usage patterns, input validation
When: MUST load when making language-specific implementation choices. ALWAYS prefer DSQL Connector when available. Contains: Driver selection, framework patterns, connection code for Python/JS/Go/Java/Rust
When: Load when looking for specific implementation examples Contains: Code examples, repository patterns, multi-tenant implementations
When: Load when debugging errors or unexpected behavior. SHOULD always consult for OCC errors, connection failures, or unexpected query results. Contains: Common pitfalls, error messages, solutions
When: User explicitly requests to "Get started with DSQL" or similar phrase Contains: Interactive step-by-step guide for new users
When: MUST load when creating database roles, granting permissions, setting up schemas for applications, or handling sensitive data. ALWAYS use scoped roles for applications — create database roles with dsql:DbConnect.
Contains: Scoped role setup, IAM-to-database role mapping, schema separation for sensitive data, role design patterns
When: MUST load when performing DROP COLUMN, RENAME COLUMN, ALTER COLUMN TYPE, or DROP CONSTRAINT Contains: Table recreation pattern overview, transaction rules, common verify & swap pattern
When: Load for DROP COLUMN, ALTER COLUMN TYPE, SET/DROP NOT NULL, SET/DROP DEFAULT migrations Contains: Step-by-step migration patterns for column-level changes
When: Load for ADD/DROP CONSTRAINT, MODIFY PRIMARY KEY, column split/merge migrations Contains: Step-by-step migration patterns for constraint and structural changes
When: Load when migrating tables exceeding 3,000 rows Contains: OFFSET-based and cursor-based batching patterns, progress tracking, error handling
When: MUST load when migrating MySQL schemas to DSQL Contains: MySQL data type mappings, feature alternatives, DDL operation mapping
When: Load when translating MySQL DDL operations to DSQL equivalents Contains: ALTER COLUMN, DROP COLUMN, AUTO_INCREMENT, ENUM, SET, FOREIGN KEY migration patterns
When: Load when migrating a complete MySQL table to DSQL Contains: End-to-end MySQL CREATE TABLE migration example with decision summary
The aurora-dsql MCP server provides these tools:
Database Operations:
Documentation & Knowledge:
Note: There is no list_tables tool. Use readonly_query with information_schema.
See mcp-setup.md for detailed setup instructions. See mcp-tools.md for detailed usage and examples.
awsknowledge)Consult for verifying DSQL service limits before advising users. The numeric limits below are defaults that may change — when a user's decision depends on an exact limit, verify it first:
| Limit | Default | Verify query |
|---|---|---|
| Max rows per transaction | 3,000 | aurora dsql transaction limits |
| Max data size per transaction | 10 MiB | aurora dsql transaction limits |
| Max transaction duration | 5 minutes | aurora dsql transaction limits |
| Max connections per cluster | 10,000 | aurora dsql connection limits |
| Auth token expiry | 15 minutes | aurora dsql authentication token |
| Max connection duration | 60 minutes | aurora dsql connection limits |
| Max indexes per table | 24 | aurora dsql index limits |
| Max columns per index | 8 | aurora dsql index limits |
| IDENTITY/SEQUENCE CACHE values | 1 or >= 65536 | aurora dsql sequence cache |
When to verify: Before recommending batch sizes, connection pool settings, or schema designs where hitting a limit would cause failures. No need to verify for general guidance or when the exact number doesn't affect the user's decision.
Fallback: If awsknowledge is unavailable, use the defaults above and note to the user
that limits should be verified against DSQL documentation.
Bash scripts in scripts/ for cluster management (create, delete, list, cluster info), psql connection, and bulk data loading from local/s3 csv/tsv/parquet files. See scripts/README.md for usage and hook configuration.
Use readonly_query with information_schema to list tables
Use get_schema to understand table structure
Use readonly_query for SELECT queries
Always include tenant_id in WHERE clause for multi-tenant apps
Validate inputs carefully (no parameterized queries available)
Use transact tool with list of SQL statements
Follow one-DDL-per-transaction rule
Always use CREATE INDEX ASYNC in separate transaction
ALTER COLUMN TYPE, DROP COLUMN, DROP CONSTRAINT are NOT supported directly
→ These require the Table Recreation Pattern (see Workflow 6)
CREATE INDEX ASYNC exclusivelytransact(["CREATE TABLE ..."])transact(["ALTER TABLE ... ADD COLUMN ..."])INSERT: MUST validate parent exists with readonly_query → throw error if not found → insert child with transact.
DELETE: MUST check dependents with readonly_query COUNT → return error if dependents exist → delete with transact if safe.
MUST load access-control.md for role setup, IAM mapping, and schema permissions.
DSQL does NOT support direct ALTER COLUMN TYPE, DROP COLUMN, DROP CONSTRAINT, or MODIFY PRIMARY KEY. These operations require the Table Recreation Pattern — creating a new table, copying data, dropping the original, and renaming. This is a destructive workflow that requires user confirmation at each step.
MUST load ddl-migrations/overview.md before attempting any of these operations.
MUST load mysql-migrations/type-mapping.md for type mappings, feature alternatives, and migration steps.
awsknowledge returns no results: Use the default limits in the table above and note that limits should be verified against DSQL documentation.