Repository navigation
Add aws-db-connectivity-pathtrace skill (find the hop that breaks a database connection) - #334
vgaglia-aws wants to merge 2 commits into
Conversation
Skill version 1.0.0. Results of the skill evaluation tool, committed under evals/: - structure v2: 12 of 12 tests passed, score 100. - best-practices v3: 17 of 17 tests passed in each of 3 iterations, score 100, consistency 100. - functional v3: 25 evals, 3 iterations. With the skill, 214 of 222 assertions passed and the expected output matched in 48 of 48 runs. Without it, 142 of 207 assertions passed (10 more errored) and the expected output matched in 37 of 47 runs; one of the 48 without-skill runs failed in setup and has no result. The 9 negative cases did not trigger the skill in any of their 27 runs.
…nd policy fixes, new eval results Folds the fixes into the 1.0.0 release and adds the answer to a request to apply a fix: the trace only recommends, and gives the precise change for the user to make without applying it. The fixes change SKILL.md, references/REFERENCE.md, README.md, the two assets, automation/README.md, automation/iam-policy.json (two prefix-list read actions, 34 in all) and evals/evals.json (four prompts, one expected output and one assertion); the 1.0.0 CHANGELOG entry describes what they add. The structure, best-practices and functional results are replaced by a new run of each against this skill: structure 100, best-practices 100 in each of three iterations, and in the functional run the skill loaded in 38 of the 48 runs that should trigger it, with 211 of 222 assertion checks and 46 of 48 expected-output checks passing. metadata.version stays 1.0.0, with one 1.0.0 CHANGELOG entry.
|
I pushed an update to the branch. It extends the skill: TLS-enforcement errors in the error index, the cluster and member instance status in the state check, the client-side rules for DynamoDB gateway endpoints, and engine-specific advice for It also adds one instruction: when asked to apply a fix, the agent gives the exact change and does not apply it. I re-ran all three suites and replaced the results: structure 100, best-practices 100 in each of three iterations, and in the functional run the skill loaded in 38 of the 48 should-trigger runs, with 211 of 222 assertion checks and 46 of 48 expected outputs passing. The version stays 1.0.0, with one 1.0.0 CHANGELOG entry, because the skill is not on main yet. I updated the description to match. This comment was drafted with an AI assistant and reviewed by me. |
Description
Tool request: #339.
This PR adds
aws-db-connectivity-pathtrace, a read-only skill for a client that cannot connect to an Amazon RDS, Aurora, DocumentDB or DynamoDB endpoint: a timeout, a refused connection, a TLS or DNS failure, or an error code the database server sends back. It has the agent read the configuration along the path from that client to the endpoint through read-only control-plane calls, walk the path hop by hop, name the first hop that blocks with a severity and the specific fix, and write a Markdown report.What it covers
no pg_hba.conf entrymessage from a client without SSL points first tords.force_ssl, and MySQLERROR 3159torequire_secure_transport. It finds the endpoint and the client with describe calls when the user has not named them, and asks only for what the control plane cannot show, such as the exact error text or an on-premises CIDR.available, reading the cluster status and the status of each member instance for Aurora and DocumentDB, matches managed events (failover, reboot, scaling, patching, maintenance) against the onset, and checks a list of known false signals.PubliclyAccessible; DNS attributes and endpoint choice, including reader-endpoint caching; VPC endpoints for DynamoDB; and TLS (the CA bundle for the instance'sCACertificateIdentifier, and the RDS for Oracle SSL option port and wallet).max_connectionsis immediate relief on MySQL and Aurora MySQL, since on PostgreSQL and Aurora PostgreSQL the change needs a reboot. Whether a cipher or TLS-version parameter can be changed is read from the parameter group (IsModifiable) rather than assumed.db-connectivity-trace-<endpoint>-<YYYY-MM-DD>.mdfromassets/report-template.md, with a verdict per hop, a Fix line for every FAIL or UNKNOWN hop and an escalation-readiness packet.SKILL.mdholds the workflow, a five-step checklist that says when each step runs and what it produces, and the severity definitions. The hop conditions, lookup tables and fix templates are inreferences/REFERENCE.md, and a reference map before the workflow inSKILL.mdsays which section to load for which step.How it differs from existing skills
network-log-analyzerworks from traffic evidence: VPC Flow Logs, REJECT records and packet captures. It checks the configuration to confirm a cause seen in that traffic. Its README lists a database timeout among its example prompts. My skill walks the configuration on the path to one database endpoint, starting from the driver error with no traffic evidence, and never queries flow logs. It hands off tonetwork-log-analyzerby name when the user brings flow logs or a packet capture, when a hop stays UNKNOWN and only traffic evidence can settle it, and for connection failures to any other destination.database-rds-devopsruns predefined health-check queries inside Aurora MySQL and Aurora PostgreSQL through the RDS Data API, with therds-aidbaMCP server, and its own workflow for "Too many connections" errors checks theDatabaseConnectionsmetric and CloudWatch Logs, then runs two of those queries (current connections against the maximum, and thread sources). My skill needs no MCP server and never connects to the database: for a connection-limit error such as MySQL ERROR 1040 it compares the same metric with the instance's ownmax_connections, read from its parameter group or taken as the engine default for its instance class.rds-operation-reviewreviews RDS and Aurora against the Well-Architected Framework and best practices, including security posture, backups and encryption. Its review also checks public access, security groups, subnet groups and connection headroom, as my review mode does, and both recommend alarms. My review mode adds network ACL return ranges, VPC DNS attributes, CA certificate currency, subnet IDs that no longer resolve, endpoint hygiene and DynamoDB gateway endpoints, and it also reviews DocumentDB clusters. In incident mode my skill starts from one client that cannot connect; my review mode checks the same path for every RDS, Aurora and DocumentDB target, checks the public-accessibility posture against intent, and reports an over-broad security group rule as LOW hygiene. My skill routes a security-posture review (exposure,0.0.0.0/0on the database port, public accessibility, encryption, IAM, audit logging, backups) to another skill: my description says "not a posture audit", and two of my should-not-trigger cases ask for one.aws-vpc-dns-investigationobserves name resolution live from inside a subnet through its MCP server and simulates DNS changes before they are applied. My skill's DNS hop reads the control plane: the VPC DNS attributes, whether the client uses the right endpoint, and private hosted zones. For reader-endpoint caching it names adigcommand that reads the live TTL rather than quoting a figure. It does not hand off to that skill.aws-routingexplains which path AWS picks and why, across Transit Gateway, Direct Connect, Cloud WAN and BGP, and also covers VPC route tables, peering routes and asymmetric return paths. My skill's route-table hop checks that the client subnet has a route to the database subnet (local, a peering connection, a transit gateway, or a virtual private gateway for VPN or Direct Connect), that the peering connection isactiveor the transit gateway attachmentavailable, and that the database subnet routes back. It checks that these routes exist for one client and one database, and does not work out which path AWS prefers.aws-systems-managerlists the AWS-owned runbookAWSSupport-TroubleshootConnectivityToRDS(read-only), which a person starts after the agent prepares it. The runbook takes an EC2 instance and an RDS DB instance, checks that the database isavailable, and evaluates their security groups, network ACLs and route tables. My skill also takes a Lambda function or an on-premises network as the client, and checks RDS Proxy, DNS, TLS, DynamoDB VPC endpoints and sessions the server rejects, none of which is among the runbook's steps. It starts no automation.aws-systems-manageralso lists a second read-only runbook,AWSSupport-ValidateRdsNetworkConfiguration, which helps prevent an RDS, Aurora or DocumentDB instance from being markedincompatible-networkbefore a modify or start operation; my review mode checks one cause of that state, a subnet ID in the subnet group that no longer resolves.database-migration-service-expertisetroubleshoots DMS task failures, including network errors between a replication instance and its source or target endpoint. Its checklist asks whether the endpoint is reachable from the DMS VPC, whether security groups allow the database port and whether the subnet network ACLs allow DMS traffic. For a network timeout it checks the connection test results (aws dms test-connection,describe-connections) and the replication instance's security groups, and names security groups, routing or DNS as the cause; it has no route-table or DNS step. My skill has no DMS-specific step (DMS appears nowhere in its SKILL.md, REFERENCE.md or README).postgresql-dba-mcp, which is already onmain), and feat: add dynamodb-data-health-inspection skill #94 and feat: add dynamodb-latency skill #96 (DynamoDB data health and latency). Going by their titles, and for Add PostgreSQL DBA skill #288 its skill description, none of them traces the network path to a database; feat(skills): add aws-elasticache-devops skill #197 (an ElastiCache troubleshooting skill) and the open issue Amazon ElastiCache troubleshooting skill #191 that asks for one are out of scope, since my skill does not cover ElastiCache.I searched the skills on
main, the custom agents, the MCP servers, the open pull requests and the open issues. The two RDS and Aurora MCP servers onmain,rds-aidbaandpostgresql-dba-mcp, run queries inside the database (aws-redshift-mcp-serverdoes the same for Amazon Redshift, which my skill does not cover), and no custom agent or open issue is about database connectivity.Read-only posture and IAM
The skill only reads and only recommends. It changes no security group, network ACL, route, DNS setting or database, and it never connects to the database itself. When the user asks the agent to apply a fix, or asks whether it can,
SKILL.mdlines 44 to 48 tell it to answer that the trace only recommends: it gives the precise fix for the user to apply (the resource ID, the rule or setting and the exact change) and does not apply it or offer to, with or without approval. For VPC Reachability Analyzer it recommends an analysis for a person to run and reads the result withDescribeNetworkInsightsPathsandDescribeNetworkInsightsAnalyses; it never callscreate-network-insights-pathorstart-network-insights-analysis.automation/iam-policy.jsonlists the 34 read actions the skill calls (STS, RDS, Lambda, EC2, Route 53 and CloudWatch metrics) in 6 statements, with no CloudWatch Logs or flow-log read. Two of them,ec2:DescribePrefixListsandec2:DescribeManagedPrefixLists, read the DynamoDB prefix list: its CIDRs for the network ACL rules and its ID for the security-group rule. 33 of the 34 are in theAIDevOpsAgentAccessPolicymanaged policy (v16, 2026-11-14); the other issts:GetCallerIdentity, which needs no IAM permission (the STS API reference says none is required, even under an explicit deny).automation/README.mdexplains each statement.Type of change
Required before review
/skills, MCP servers in/mcp, custom agents in/custom-agents; skills and MCP servers are never mixed in one directory. Here: one directory,skills/aws-db-connectivity-pathtrace/.structure,best-practicesandfunctionalresults from the skill evaluation tool are committed underevals/.111122223333, the resource IDs in the examples and prompts are made up, and in the committed functional results I replaced the test account's DynamoDB table name, security group IDs and stack names with placeholders. The test account's own ID appears there only as012345678901_1, the placeholder the skill evaluation tool writes when it redacts an account ID. Upstream's identifier allowlist names that placeholder, andscan_aws_identifiers.pyreports 0 findings in the 263 files.Testing
structurechecks pass. Here:evals/structure/structure-tests-results-v4.json, score 100, 12 of 12 checks passed, run 2026-12-03.best-practicesrun across multiple iterations, with consistent results. Here:evals/best-practices/v7/, 3 iterations on 2026-12-03, 100 / 100 / 100 with every one of the 17 checks passing in all three (consistency 100), judge modelus.anthropic.claude-sonnet-5. An earlier run on the sameSKILL.mdis described below.functionalrun with and without the change, so the difference in the agent's behavior is visible. Here:evals/functional/v6/, 3 iterations of the 25 cases on 2026-12-03 (both arms for the 16 should-trigger cases and the skill arm only for the 9 should-not-trigger cases: 16 x 3 x 2 + 9 x 3 = 123 runs), with 0 runs failed in the tool. With the skill available the agent loaded it in 38 of the 48 runs of the 16 should-trigger cases, passed 211 of 222 assertion checks and met the expected output in 46 of 48 runs; without the skill it passed 160 of 222 checks, 4 of which could not be judged (see below), and met the expected output in 38 of 48.evals/evals.jsonincludes positive cases (should trigger) and at least one negative case (should not trigger on unrelated input). Here: 16 should-trigger cases with 74 assertions and 9 should-not-trigger cases (a database security audit, a posture report on open0.0.0.0/0rules, a security-group rule quota error, a Python function, the weather, a slow query on a connected database, marketing spend, DynamoDB hot-partition throttling and ElastiCache evictions); the skill loaded in none of the 27 runs of the negative cases.All three result sets come from the skill evaluation tool and are committed under
evals/, the last run of each suite:evals/functional/v6/,evals/best-practices/v7/andevals/structure/structure-tests-results-v4.json(the version numbers are the tool's). Manual with-skill and without-skill Ops Agent output is not attached.The best-practices suite ran twice on this
SKILL.md, andv7is the second run. The first, the tool'sv6, is left out because CONTRIBUTING.md asks for only the last version of each test type. It scored 94, 94 and 100. Each 94 had one check that did not pass and one warning. The judge failed the check for reference material in the body once, naming the hop list, the severity definitions and Steps 2 to 4. It errored the description check once by returning a verdict the tool does not allow. Both times it warned that the body explains general networking, such as network ACL return traffic and ephemeral ports. All of those passages were in the body before the apply-a-fix instruction, the last change to it.In the functional run, whose judge is
us.anthropic.claude-sonnet-5, no assertion isalways_fails:evals/functional/v6/benchmark.jsonclasses the 74 assertions as 47always_passes, 16flakyand 11skill_uplift. The 38 with-skill runs that loaded the skill passed 172 of 179 checks and met the expected output in all 38. In the other 10 the agent answered without loading it, and passed 39 of 43 checks and 8 of 10 expected outputs. They include all three runs of two cases, the engine default ports (recall-02) and the TLS settings for Oracle and DocumentDB (recall-14). The agent answers both in full without the skill: every assertion and expected output of those two cases passes in both arms. Two other should-trigger cases, recall-04 and recall-08, meet their expected output in 0 of 3 runs without the skill and in 3 of 3 with it; one of the three recall-04 runs without it is the run described next.One without-skill run, iteration 3 of recall-04 (whether the agent can run VPC Reachability Analyzer), ended with no final response, so the judge had nothing to grade: its 4 assertion checks were not judged and its expected output failed. That is why the without-skill arm reads 160 passed of 222 with 4 not judged. 38 should-trigger runs (5 with the skill, 33 without) report a runtime of 0s and a cost of $0.00 in their metrics. Each of them was judged on a final response, so those two readings do not mean that a run did not execute.
One change to
SKILL.mdcame from the functional evals. The recall-03 case asks what else has to be true for an internet client to reach an RDS instance that hasPubliclyAccessibleset, and whether the agent can change any of it or only say what to change. In the last functional run before that change, the agent with the skill loaded offered to apply some fixes with the user's approval, such as a route to an internet gateway, and the expected output passed in 0 of 3 runs. My skill said that every fix is a recommendation the user applies, but not how to answer that question. I added the instruction atSKILL.mdlines 44 to 48 and re-ran all three suites, and the results committed here are that re-run. With the skill, recall-03 now meets the expected output in 3 of 3 runs (1 of 3 without it), and each of the three answers tells the user to apply the fix and offers to apply nothing.The prompts in
evals/evals.jsonchanged too. Four of them (smoke-01, recall-03, recall-04 and recall-06) referred to the skill itself, with words such as "this skill" or "the read-only skill". A prompt like that tells the run without the skill what kind of answer is wanted, and a user would not type it. Without those words some of the four no longer said that a database was involved, so each now opens with a failing connection to an RDS or Aurora database and asks its question without naming the skill. The recall-13 expected output and one of its five assertions gave a 1-second TTL for the reader endpoint, a figure I could not find in the Aurora endpoint documentation.references/REFERENCE.mdno longer gives it and names adigcommand that reads the live TTL, and the case now asks for a short TTL.The evals ran on this
SKILL.mdwith one difference, line 5: it saidversion: "1.1.5", the version number my own copy had reached. A new skill starts at 1.0.0 here, so after the evals I changed that line and nothing else; the 38 with-skill journals that loaded the skill still showversion: "1.1.5". The tool's upload to the agent holdsSKILL.md,references/,assets/andautomation/iam-policy.jsonand leaves outREADME.md,CHANGELOG.mdandevals/, so the CHANGELOG and theevals/folder of this PR did not change what the agent read.Skills — complete if this PR adds or changes a skill
SKILL.mdfrontmatter is valid:namematches the directory,descriptionpresent and within length limits, body at most 500 lines. Here:descriptionis 927 characters, the body is 368 lines as the upstream check counts them, andmetadata.summaryis set.validate_skills.pyreports 0 errors and 3 warnings: "Amazon Aurora", "Amazon DocumentDB" and "Amazon DynamoDB" inaws-servicesare not invocabulary.json.descriptionis written from the agent's point of view — scenarios, services, error types, symptoms. Here: symptoms, verbatim error codes and scenarios, and it says it is a reactive break-point diagnosis, not a posture audit.metadata.aws-devops-agent-skills.agent-types(INCIDENT_RCA,INCIDENT_TRIAGE,INCIDENT_MITIGATION, …), not leftGENERICwithout reason. Here:CHAT, INCIDENT_RCA.references/REFERENCE.mdsections (b) to (h); a server error code or a known false signal cuts the walk short.references/orassets/and loads on demand. Here: 14 pointers that say when to load a section ofreferences/REFERENCE.md, and two toassets/(the report template and a sample context)..skilleval.yamlaudit setting; no scripts or code.Security and safety
License confirmation
This description was drafted with an AI assistant and reviewed by me.