跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
搜索与研究

aiml-access-diagnostics

Use this skill when diagnosing IAM and access failures for Bedrock and SageMaker. It traces the authorization chain — caller identity, iam:PassRole, trust policy, role permissions, resource policies, SCPs — to name the denying hop and propose a scoped policy. Read-only. Use when a Bedrock or SageMaker call fails on permissions: InvokeModel or Converse AccessDeniedException, CreateTrainingJob or CreateEndpoint AccessDenied, "is not authorized to perform", "not authorized to perform: iam:PassRole", or an execution role that cannot reach S3, ECR, or KMS. Also covers Marketplace and model-subscription denials that are not IAM gaps, and failures under non-access codes: ValidationException "Could not assume role" (trust-policy gap) or "No S3 objects found under S3 URL" (execution role cannot list the prefix). Do NOT use for IAM questions outside AI/ML, policy authoring or least-privilege review without a failure, throttling or quota errors (ThrottlingException), model quality issues, or non-

aws · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add aws/tools-for-devops-agent --skill aiml-access-diagnostics

技能说明


name: aiml-access-diagnostics description: > Use this skill when diagnosing IAM and access failures for Bedrock and SageMaker. It traces the authorization chain — caller identity, iam:PassRole, trust policy, role permissions, resource policies, SCPs — to name the denying hop and propose a scoped policy. Read-only.

Use when a Bedrock or SageMaker call fails on permissions: InvokeModel or Converse AccessDeniedException, CreateTrainingJob or CreateEndpoint AccessDenied, "is not authorized to perform", "not authorized to perform: iam:PassRole", or an execution role that cannot reach S3, ECR, or KMS. Also covers Marketplace and model-subscription denials that are not IAM gaps, and failures under non-access codes: ValidationException "Could not assume role" (trust-policy gap) or "No S3 objects found under S3 URL" (execution role cannot list the prefix).

Do NOT use for IAM questions outside AI/ML, policy authoring or least-privilege review without a failure, throttling or quota errors (ThrottlingException), model quality issues, or non-AI/ML services. metadata: author: tamrish version: "1.2.2" aws-devops-agent-skills.agent-types: "Chat tasks, Incident RCA" aws-devops-agent-skills.aws-services: "Amazon Bedrock, Amazon SageMaker, AWS IAM" aws-devops-agent-skills.technical-domains: "Security"

AI/ML Access Diagnostics

Diagnose why an AI/ML service call was denied. Walk the authorization chain hop by hop, name the hop that denied the call, and propose a scoped IAM policy for human review. Read-only throughout.

Checklist

Work through these steps in order. Each is detailed in its own section below.

  • Step 1 — Classify the request: confirm the service is Bedrock or SageMaker, and that there is an observed failure (not a speculative audit). Stop otherwise.
  • Step 2 — Establish identity and scope: record the agent's own identity, extract the principal/action/resource ARNs, and flag cross-account.
  • Step 3 — Collect evidence, policy reads first: read the chain's policy documents by hand; use CloudTrail and simulation only as corroboration.
  • Step 4 — Walk the chain: traverse the six hops in precedence order; do not stop at hop 1 just because it passed.
  • Step 5 — Apply service-specific knowledge: rule out non-IAM denial causes for the service explicitly.
  • Step 6 — Assign verdicts: give every hop exactly one token from the closed verdict set.
  • Step 7 — Propose a policy: derive a scoped policy for human review; keep observed and commonly-required permissions labelled separately.
  • Step 8 — Deliver the report: render per the report format, run the pre-render validation, then deliver.

Output Discipline

The report is the deliverable. Conversation around it is not.

  • Do not narrate API calls. No per-call summaries, no interim results, no raw response extracts. A full diagnosis makes many reads; announcing each one buries the finding.
  • Do not narrate plans or reasoning. No "Let me check...", "I'll now look at...", "Given the chain, I should...". Execute the step and move on.
  • Do not echo raw API responses. Process them silently. Policy documents in particular are long, and pasting them displaces the diagnosis.
  • Keep interstitial messages to one line. Speak between steps only at real milestones: starting, asking the user something, delivering, or erroring.
  • Do not summarize after delivering. The report already contains the summary; restating it invites a shortened paraphrase to be read instead of the report.
  • Never assess your own performance. Do not append a paragraph saying the diagnosis worked, was correct, handled a hard case, or caught something subtle. The reader evaluates the report; the report does not evaluate itself. Self-congratulation also lends unearned confidence to findings whose limitations the report has just carefully enumerated.
  • Nothing follows the report except, at most, a single line offering a next action — saving an artifact, or running another failure. No recap, no restatement of the root cause, no commentary on the diagnosis.

Supported Services

ServiceCoverage
Amazon BedrockFull — including non-IAM denial causes
Amazon SageMakerFull — including PassRole and execution-role chains
Other AI/ML servicesNot supported in this version. State this plainly and stop.

If the request concerns an unsupported service, say so and do not attempt a partial diagnosis from the generic chain alone. The value of this skill is in the service-specific knowledge; without it the output would be a guess.

Architecture

  • This skill (orchestrator): request classification, chain traversal order, verdict assignment, report rendering.
  • Chain model: the six-hop authorization chain and its precedence rules — references/access-chain-model.md
  • Data collection: the read-only API allowlist, error classification, and the structured object collection produces — references/data-collection.md
  • Finding logic: verdict rules and body templates per failure class — references/finding-logic.md
  • Report format: report structure and pre-render validation — references/report-format.md
  • Service specifics: loaded only for the service in question — references/svc-bedrock.md, references/svc-sagemaker.md

Step 1: Classify the request

Classify before calling any tool. Two things must be established first.

1a. Which service?

Determine the AI/ML service from the error text, API name, or resource ARN. If it is not Bedrock or SageMaker, stop and report it as unsupported.

1b. Is there an observed failure?

Evidence availableRoute
User pasted an error messageObserved — parse it, then corroborate with CloudTrail
No error text, but a principal and action are namedObserved — locate the event in CloudTrail
阅读完整来源 ↗