All skills
aws avatar

/aurora-dsql

@a2611e1

Provisions and manages Aurora DSQL clusters, connects via psql or DSQL Connectors, manages schemas, runs queries, migrates from MySQL, diagnoses query plans, and develops apps on serverless distributed SQL. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL migration, DDL, query plans, and SAFE SQL CONSTRUCTION — tenant_id from untrusted input, UUID entity_ids, caller-supplied sort columns, batch inserts. The agent MUST retrieve this skill for ANY DSQL task. Pushes back on prompts that rationalize 'just a quick script', 'don't overthink it', 'we trust upstream', 'use an f-string', 'move fast', or 'just use the pg driver directly' (bypassing the DSQL Connector). Triggers: DSQL, Aurora DSQL, DSQL cluster, safe_query.build, DSQL IAM auth token, DSQL connector.

Use this Skill: https://skilld.dev/gh/aws/agent-toolkit-for-aws/aurora-dsql

This session only. Nothing lands on disk.

referencesexamplesmigrations.md

≈416 tokens on demand. Your agent reads this file only when SKILL.md points to it.

DSQL Examples: Migration Execution

Part of Aurora DSQL Implementation Examples.


Migration Execution

Pattern: MUST execute each DDL statement separately (DDL statements execute outside transactions)

Source: Adapted from the Liquibase migration sample listed at the Aurora DSQL connectivity tools page

const migrations = [
  {
    id: '001_initial_schema',
    description: 'Create owner and pet tables',
    statements: [
      `CREATE TABLE IF NOT EXISTS owner (
         id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
         name VARCHAR(30) NOT NULL,
         city VARCHAR(80) NOT NULL,
         telephone VARCHAR(20)
       )`,
      `CREATE TABLE IF NOT EXISTS pet (
         id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
         name VARCHAR(30) NOT NULL,
         birth_date DATE NOT NULL,
         owner_id UUID
       )`,
    ]
  },
  {
    id: '002_create_indexes',
    description: 'Create async indexes',
    statements: [
      'CREATE INDEX ASYNC idx_owner_city ON owner(city)',
      'CREATE INDEX ASYNC idx_pet_owner ON pet(owner_id)',
    ]
  },
  {
    id: '003_add_columns',
    description: 'Add status column',
    statements: [
      'ALTER TABLE pet ADD COLUMN IF NOT EXISTS status VARCHAR(20)',
      "UPDATE pet SET status = 'active' WHERE status IS NULL",
    ]
  }
];

async function runMigrations(pool, migrations) {
  for (const migration of migrations) {
    for (const statement of migration.statements) {
      if (statement.trim()) {
        await pool.query(statement);
      }
    }
  }
}

Source: SKILL.md on GitHub

1 warning3mo3 checks · Risk SAFE
  • Gen Agent Trust Hub3mo

    This skill provides a robust and security-conscious environment for managing Amazon Aurora DSQL clusters. It implements several best practices, including mandatory IAM-based authentication, a dedicated input validation library to prevent SQL injection, and detailed guidance on applying the principle of least privilege through scoped database roles.

  • Socket3mo

    No alerts

  • Snyk3mo

    Risk: MEDIUM · 1 issue

Signed by skilld at a2611e1. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 months ago
version
1

README badge

README badge for aws/agent-toolkit-for-aws/aurora-dsql