SKILL

hf-cloud-sagemaker-iam-preflight

在部署或训练之前确保存在可用的 SageMaker 执行角色。每当即将创建 SageMaker 端点、模型、训练作业或任何需要执行角色的资源时,使用此技能。尤其适用于用户未明确提供角色 ARN、脚本即将调用 `iam:CreateRole`,或 AccessDenied 错误提及某个 IAM 操作时。切勿盲目调用 `iam:CreateRole`——务必先检查现有角色。此技能可防止最常见的 SageMaker 部署失败:试图从没有 IAM 写入权限的 SSO 主体创建 IAM 资源。

机器翻译
查看英文原文

Ensure a usable SageMaker execution role exists before deploying or training. Use this skill whenever about to create a SageMaker endpoint, model, training job, or any resource that requires an execution role. Use it especially when the user has not provided a role ARN explicitly, when scripts are about to call `iam:CreateRole`, or when an AccessDenied error mentions an IAM action. Never blindly call `iam:CreateRole` — always check for existing roles first. This skill prevents the most common SageMaker deployment failure: trying to create IAM resources from an SSO principal that has no IAM write permissions.

适用对象:云服务、运维与安全。自动收录 · 待核查。

原作者说明节选

从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。

查看英文原文

原文涵盖的主题

  • SageMaker IAM Preflight
  • Running the helpers (cross-platform)
  • Order of operations
  • Step 1 — Did the user provide a role?
  • Step 2 — Discover existing roles
  • Step 3 — Create, only if discovery found nothing
  • What "validated" means
  • Minimum permissions

Every SageMaker resource needs an execution role — the IAM role SageMaker assumes to read model artifacts from S3, pull serving containers from ECR, and write logs. Most deployments fail here because the script tried to create a new role without checking if a usable one already existed, then blew up because the caller is an SSO principal. This skill encodes the right order: discover, validate, only create if necessary. The helpers are Python so they run identically on Windows, macOS, and Linux: Run them from the shell where the AWS CLI already works — i.e. wherever aws sts get-caller-identity succeeds. The script shells out to that same aws binary and inherits the shell's profile, region, SSO session, proxy, and credential chain. Windows / WSL / Git Bash caveat. Do not invoke these through a Bash shim (WSL, Git Bash, MSYS) on Windows. Those Bash environments frequently do not share the Windows AWS config, credentials, SSO sessions, environment variables, or proxy settings — so aws sts get-caller-identity fails inside Bash even when it works natively in PowerShell. (This is exactly why the old .sh helpers failed on Windows and were replaced with Python.) If you're in PowerShell, run

这里只展示节选,请以完整原文和当前要求为准。

来源仓库
huggingface/skills
源文件
skills/hf-cloud-sagemaker-iam-preflight/SKILL.md
固定版本
25910b3d0ba31a2ba102f901cdc9e008c278a69c
阅读完整原作者说明 ↗

来源与内容状态

本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。

原作者:huggingface/skills · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T16:01:02.685Z。

分类由名称、说明与路径规则生成,分类不代表已核实适配。

许可与权利归属

Apache-2.0。第三方内容及版权归原作者,使用条件以原文为准。

许可原文 ↗

本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。

限制与注意事项

  • 元数据收录不代表本站已经安装、适配、实测或进行安全审查。