Repository navigation
Add storage-s3-failure-diagnosis skill (live diagnosis of active S3 failures) - #338
Draft
vgaglia-aws wants to merge 2 commits into
Draft
vgaglia-aws wants to merge 2 commits into
vgaglia-aws wants to merge 2 commits into
Conversation
Adds a skill that diagnoses an active Amazon S3 failure in one of four families: access-denied, replication, lifecycle, and request-rate errors (503 SlowDown and 500 InternalError). It collects the bucket's actual configuration through control-plane, read-only APIs, walks a decision tree per family, assigns a severity and writes a shareable Markdown report. It never reads or writes object data and never changes a resource; every fix is a recommendation. Evals: 26 cases in evals/evals.json (18 that should trigger the skill and 8 that should not). Structure scored 100, and best practices scored 88, 100 and 100 in three iterations. In the functional run (three iterations of every case), the skill loaded in 39 of the 54 runs that should trigger it and in none of the 24 runs that should not; 8 of those 54 runs started with a smaller agent context and did not load the skill.
skills/storage-s3-failure-diagnosis/README.md, section "Packaging and
Upload".
The zip upload is now Option A and recommended. The repository import is
Option B: it states the User Guide limits for an imported directory (at
most 100 files and 6 MB), that this directory holds 280 files (272 under
evals/) and about 7 MB, so pointing the import at the directory is
refused ("Repository scope contains 280 files, exceeds the import
limit", tested 2026-12-04), and how to import a copy of the zip file set
(SKILL.md, references/, assets/, automation/iam-policy.json) from a
repository the connected GitHub account can read: Knowledge page, Skills
tab, Add skill, Import from repository, the directory's GitHub URL,
agent types Chat tasks and Incident RCA, status Active, Import skill.
The note on connecting a personal GitHub account moved with the import
text and no longer names this repository as one you can import. Option C
now says "the same zip upload".
Source: AWS Ops Agent User Guide,
about-aws-devops-agent-devops-agent-skills, "Importing a skill from a
repository" (its Constraints and its steps), read 2026-12-04.
No other file changes. metadata.version stays 1.0.0: this branch adds
the skill at 1.0.0, so there is no earlier version to bump from.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Tool request: #337.
This PR adds
storage-s3-failure-diagnosis, a read-only skill for an Amazon S3 problem that is happening now: a 403 Access Denied, replication that stalled or failed, a lifecycle rule that does not transition or expire, or 503 SlowDown and 500 InternalError responses. It has the agent read the bucket's actual configuration through control-plane APIs, walk a decision tree for that failure family, assign a severity and write a Markdown report with the specific fix.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/storage-s3-failure-diagnosis/.structure,best-practicesandfunctionalresults from the skill evaluation tool are committed underevals/.111122223333and444455556666, and the bucket and role names are generic placeholders. In 18 of the 132 functional run journals I replaced the test account's bucket, Lambda function, trail and stack names, its S3 canonical user ID, its Cost Explorer figures (among them the size of its S3 bill in a sentence the agent wrote), its description as Cost Explorer returned it, and an AWS documentation example ARN whose account is not on the repository's allowlist, plus one internal system name the agent wrote in its notes. The patterns for the cost figures also replaced other numbers in those journals, such as the 40% in the cost question's own prompt.How it differs from existing skills
storage-s3-resiliency-expertisereviews the posture of one or many buckets across nine dimensions and rates them. My skill starts from a failure the user is seeing and finds its cause. My skill's description routes resiliency, security and data-protection reviews tostorage-s3-resiliency-expertiseby name.aiml-access-diagnosticscovers Bedrock and SageMaker roles that cannot reach S3. My skill covers the S3 side of a 403 for any caller.aws-backup-coverage-reviewcovers backup coverage and shares no checks with my skill.Open PR datalake access analyzer skill #212 (
datalake-access-analyzer) covers Lake Formation and Glue Data Catalog access denied, including S3 locations registered with Lake Formation. My skill does not read Lake Formation permissions and does not check whether an S3 location is registered with Lake Formation.Open PR Add s3-access-denied-resolver skill #302 (
s3-access-denied-resolver) diagnoses S3 403 AccessDenied by walking ten authorization layers, and its description rules out 503 SlowDown, replication and lifecycle issues. That overlaps the access-denied family of my skill. Within that family:references/REFERENCE.mdsection (a.0) names the SSE-C block only as a message shape, under its table of enhanced 403 clauses.The replication, lifecycle and request-rate families are not in Add s3-access-denied-resolver skill #302.
Issue [request]: S3 storage cost optimisation custom agent (audit buckets, estimate waste, recommend lifecycle rules) #238 asks for an S3 storage cost optimisation custom agent; that is out of scope here.
I searched the skills on
main, the custom agents, the MCP servers, the open pull requests and the open issues. The only other tool built to diagnose active S3 failures is open PR #302, which covers 403s only;aiml-access-diagnosticsand PR #212 reach S3 only from the Bedrock, SageMaker or Lake Formation side.What it covers, by family:
s3:ListBucket.PENDINGorFAILEDobjects), the Object Lock asymmetry, conflict precedence, the 128 KB minimum object size for transitions and its override, minimum storage durations, directory buckets, and the two timing facts every lifecycle finding states (actions can take days or weeks, and the clock is the object'sLastModifiedtimestamp).In every family the agent checks for an AWS service event before naming a configuration cause and tests each finding against known non-findings. When a finding is High or Critical or the fix is not self-serviceable, the report adds an escalation packet listing what AWS Support will ask for. For a principal locked out by the bucket's own policy, the skill gives a hard-stop referral instead of a fix: it says a support case will not remove that policy and gives the self-service path, the account root user or, for a member account in AWS Organizations, centralized root access.
SKILL.mdcarries the workflow: a six-step checklist that says when each step runs and what it outputs. The decision trees, the fact tables and the severity definitions live inreferences/REFERENCE.md, and a reference map at the top ofSKILL.mdsays which section to load for which step.Read-only posture and IAM
The skill only reads and only recommends; it never changes a bucket and never reads object data.
automation/iam-policy.jsonlists the 23 read actions the skill calls (S3, CloudTrail, CloudWatch, Service Quotas and AWS Health) in 5 statements. 21 of them are in theAIDevOpsAgentAccessPolicymanaged policy, checked against version 16 of that policy, edited 2026-11-14. The other 2,s3:GetBucketRequestPaymentands3:ListAccessPoints, sit in their own optional statement, and the skill reports those checks as not performed when the default agent role cannot run them.automation/README.mdexplains each statement, andreferences/REFERENCE.mdsection (i) maps each API call to its IAM action.Testing
structurechecks pass. Here:evals/structure/structure-tests-results-v1.json, score 100, 12 of 12 checks passed, run 2026-12-03.best-practicesrun across multiple iterations, with consistent results. Here:evals/best-practices/v2/, 3 iterations on 2026-12-03 with judge modelus.anthropic.claude-sonnet-5, scores 88, 100 and 100 (consistency 88). In iteration 1 the judge, at medium confidence, failed 2 of the 17 checks: reference material in the body (its evidence is the S3 API list in Step 2) and an output template in the body (the six-part report outline in Step 5). Iterations 2 and 3 passed all 17. An earlier best-practices run on the sameSKILL.md, the same day, scored 100 in all three iterations; it is not in the PR, because CONTRIBUTING.md asks for the last version of each test type only.functionalrun with and without the change, so the difference in the agent's behavior is visible. Here:evals/functional/v6/, 3 iterations of the 26 cases on 2026-12-03, 132 of 132 runs completed: 18 should-trigger cases x 3 iterations x 2 arms, and 8 should-not-trigger cases x 3. With the skill available the agent loaded it in 39 of the 54 should-trigger runs, passed 209 of 264 assertion checks and met the expected output in 42 of 54 runs; without the skill it passed 146 of 264 checks and met the expected output in 28 of 54.evals/evals.jsonincludes positive cases (should trigger) and at least one negative case (should not trigger on unrelated input). Here: 18 should-trigger cases and 8 should-not-trigger cases (an AWS bill, an EC2 resize, a Lambda timeout, EBS gp3 throughput, EFS burst credits, an S3 posture review, an S3 cost question and a question about what is inside an S3 object); the skill loaded in none of the 24 runs of the should-not-trigger cases.All three result sets come from the skill evaluation tool and are committed under
evals/. In the functional run, whose judge isus.anthropic.claude-sonnet-5,evals/functional/v6/benchmark.jsonclasses the 88 assertions as 40always_passes, 29flaky, 11skill_upliftand 8always_fails. Seven of the 8always_failsbelong torecall-four-familiesandrecall-lifecycle-conflict-and-waterfall, two cases where the skill never loaded (below). The eighth is the Object Lock asymmetry inrecall-lifecycle-blocked-by-replication(current versions can expire, noncurrent versions under retention or legal hold cannot): the skill loaded in all 3 of that case's with-skill runs, and the judge failed that assertion in all 6 runs. In two of the three runs of the S3 posture-review case, the agent loadedstorage-s3-resiliency-expertise, the skill my description points to for reviews.In 15 of the 132 runs the agent session started with a smaller context: the first context-window reading in its journal is 4.1 or 4.2 percent, against 4.4 or 4.5 in the other 117 runs. All 15 started within seven seconds of each other, among the first 20 runs to start, and 7 of them were runs without the skill. The skill loaded in none of the 8 with-skill should-trigger runs among them: all three runs of
recall-four-familiesand ofrecall-request-rate-numbers, and one run each ofrecall-explicit-vs-implicit-denyandsmoke-403-kms. I do not know its cause. Every with-skill run ofrecall-four-familiesandrecall-request-rate-numbersstarted this way, so this run does not show whether my skill loads for those two prompts in a normal session. In the other 46 with-skill should-trigger runs the skill loaded in 39. The 7 misses there are all three runs ofrecall-lifecycle-conflict-and-waterfall, two ofrecall-403-evaluation-order-and-same-account-boolean, and one each ofrecall-existing-objects-replicationandrecall-severity-levels. That makes 15 misses in the 54 with-skill should-trigger runs (8 + 7), and three should-trigger cases that never loaded the skill in any run:recall-four-families,recall-request-rate-numbersandrecall-lifecycle-conflict-and-waterfall.recall-request-rate-numberspassed 0 of 12 checks with the skill available and 5 of 12 without, and met the expected output in 0 of 3 runs on each side. In two runs ofrecall-request-rate-numbersthe agent loaded a different skill,verifying-with-docs.20 runs report a runtime of
0sand a cost of$0.00, 7 with the skill and 13 without, although each has a 7-record journal and graded assertions. None of the 20 made a tool call, and every run with a runtime above0smade at least one, so I read the zeros as the way the tool measures an answer without tool calls, not as runs that did not execute. 12 of the 20 are among the 15 runs that started with a smaller context.Apart from the replacements listed under "Required before review", the result files are as the tool wrote them. The 39 journals that loaded the skill show
version: "1.0.0"in theSKILL.mdtext the agent read, the version this PR adds.I also ran the README's three Chat prompts in two live AWS Ops Agent (formerly AWS DevOps Agent) sessions, on 2026-12-02 with an earlier draft of the skill and on 2026-12-03 with the skill files in this PR, both uploaded with the SDK's upload command. The skill loaded on all three prompts each time, and the agent's reads of
references/REFERENCE.mdsucceeded on that upload's folder-prefixed layout. I did not run a live session without the skill; the 54 without-skill runs of the functional suite are that comparison.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 1,004 characters, the body is 259 lines, andmetadata.summaryis 146 characters.descriptionis written from the agent's point of view — scenarios, services, error types, symptoms. Here: scenarios, error codes and symptoms, with a referral to the posture-review skill.metadata.aws-devops-agent-skills.agent-types(INCIDENT_RCA,INCIDENT_TRIAGE,INCIDENT_MITIGATION, …), not leftGENERICwithout reason. Here:CHAT, INCIDENT_RCA.references/REFERENCE.mdsections (a) to (d), each loaded from the reference map inSKILL.md.references/orassets/and loads on demand. Here: ten load-when pointers toreferences/REFERENCE.mdsections and one to the sample context inassets/..skilleval.yamlaudit setting; no scripts or code.Security and safety
License confirmation
This description was drafted with an AI assistant and reviewed by me.