Automation & Ops

SageMaker IAM Preflight

Find and validate a usable SageMaker execution role before deployment or training.

41/ 100
Not recommended

Current benefit does not outweigh risk or uncertainty.

See how it was scored ↓
Works as-is in
Codex · Claude Code
Stars
★ 11k
Last updated
18d ago
License
Apache-2.0
aws-sagemakeraws-iamiam-rolecloud-deployment
+2aws-clipython

What does this skill do, and when should you use it?

This skill checks for a usable SageMaker execution role before creating endpoints, models, training jobs, or other role-dependent resources. It validates a user-supplied role first, then discovers existing SageMaker-style roles and ranks them by recent use. Role creation is considered only when discovery finds nothing and the caller has the required IAM permissions. It is a good fit for AWS CLI-based workflows that need to avoid predictable failures from SSO principals without IAM write access.

Runs Python helper scripts to validate a named role or ARN, or discover existing roles matching common SageMaker naming patterns. It ranks candidates by RoleLastUsed and falls back to CreateDate when last-used data is unavailable. It verifies that the role exists and that its trust policy allows sagemaker.amazonaws.com to call sts:AssumeRole, then prints a usable ARN on success. If no role is found, it provides separate paths for users who can create roles and SSO users who must obtain an ARN or permissions from an AWS administrator. It also documents equivalent AWS CLI commands for manual discovery and validation.

Good fit
  • A developer is deploying a SageMaker endpoint without an explicit execution-role ARN.
  • A machine-learning engineer is preparing a SageMaker model or training job and wants a role check before deployment code runs.
  • An AWS SSO user receives an IAM AccessDenied error and needs to distinguish a missing role from missing creation permissions.
  • An operations team has several SageMaker roles and wants to prefer the recently used, potentially maintained role.
  • A user needs the same preflight workflow on Windows PowerShell, macOS, or Linux.

How do you install this skill?

Before you use it
  • create_role.py attaches AmazonSageMakerFullAccess; perform a manual least-privilege review before execution.
  • Role creation, managed-policy attachment, and inline-policy creation have no transactional rollback; partial failures may leave resources configured.
  • Trust validation uses substring matching and does not strictly verify Principal, Action, or conditions.
  • The skill depends on a working local AWS CLI, credentials, and reachable AWS services; mainland-China network reachability and Chinese-language support are not documented.
Before you start
Your agent needs
  • Shell / CLI
  • Network access
  • Local filesystem
Install first
  • Python
  • AWS CLI

Copy or symlink the hf-cloud-sagemaker-iam-preflight folder from the repository's skills/ directory into a standard Codex .agents/skills location, such as $REPO_ROOT/.agents/skills or $HOME/.agents/skills. The README does not document a standalone installation command for this individual skill.

Generic route: install into Claude Code manually (macOS / Linux)
tmp="$(mktemp -d)"
git clone --depth 1 https://github.com/huggingface/skills.git "$tmp"
mkdir -p ~/.claude/skills
cp -R "$tmp/skills/hf-cloud-sagemaker-iam-preflight" ~/.claude/skills/
rm -rf "$tmp"

Generated from the source repository and skill path; it copies only this skill's folder. If the author's install steps above differ, follow those first. To scope it to one project, replace ~/.claude/skills with that project's .claude/skills.

How do you use this skill?

Try saying

Once installed, send your agent any of these to trigger it:

  • Before creating this SageMaker training job, use the SageMaker IAM preflight skill to check and validate the execution role.

Run the helpers from the same shell where AWS CLI identity works with aws sts get-caller-identity. Validate a supplied role with python3 scripts/check_role.py "<role-name-or-arn>", or discover roles with python3 scripts/check_role.py. On Windows PowerShell, use python scripts/check_role.py directly. A suitable trigger is: “Before creating this SageMaker training job, use the SageMaker IAM preflight skill to check and validate the execution role.” If discovery finds nothing and the user has IAM permissions, run python3 scripts/create_role.py "<role-name>" "<model-bucket>". For an SSO principal without creation permissions, stop and request an administrator-provided role ARN or the required IAM grants.

What are this skill's strengths and limitations?

Pros
  • Enforces discovery and validation before role creation.
  • Ranks existing roles by recent use and falls back to creation date when needed.
  • Checks the SageMaker trust relationship that is required for role assumption.
  • Uses Python helpers across Windows, macOS, and Linux and includes a native AWS CLI fallback.
  • Gives concrete remediation guidance for SSO users without IAM write permissions.
Limitations
  • Does not deeply simulate or verify all role permissions.
  • Requires Python, AWS CLI, working credentials, and network access to AWS.
  • The source provides no test suite, version pinning, or standalone package.
  • Role creation remains dependent on the caller having the necessary IAM permissions.

How does this skill compare with similar options?

Side by side with related skills; every score comes from the same FSRS standard.

Skill FS score Stars Last updated License
SageMaker IAM Preflight this page 41 · Not recommended ★ 11k 18d ago Apache-2.0
AWS Context Discovery 50 · Use with care ★ 11k 18d ago Apache-2.0
SageMaker Python Environment Setup 49 · Use with care ★ 11k 18d ago Apache-2.0
SageMaker Production Defaults 46 · Use with care ★ 11k 18d ago Apache-2.0
Google Cloud Developer Onboarding ✓ Google · Official 42 · Not recommended ★ 21k 12d ago Apache-2.0

The documented Native AWS CLI equivalent is a manual alternative to the Python helpers: users list candidate roles, inspect trust policies, and compare last-used or creation dates themselves.

How did FollowSkills review this skill?

FollowSkills review · FSRS-2.0
Not recommended
41/ 100 5-point scale 2.1 / 5
The upstream repository has new commits since this review. The score still applies to the reviewed revision shown and may not cover the latest changes.
1Trust7 / 25 · 1.4/5

The skill requires discovery and validation before creation and documents AWS credential inheritance and failure feedback. However, creation lacks explicit user confirmation and rollback, defaults to attaching AmazonSageMakerFullAccess, and the supplemental policy still uses wildcard resources for ECR and CloudWatch, so least-privilege deductions are substantial.

2Reliability8 / 20 · 2.0/5

The two Python helpers have coherent parameters, exit codes, failure paths, and native CLI fallback guidance. However, trust validation is only a substring check, partial creation failures leave resources behind, and no key-path tests are present; under static calibration the score stays at or below 10.

3Adaptability8 / 15 · 2.7/5

Triggers, inputs, Windows versus Unix guidance, and the SSO scenario are relatively clear. The skill is narrowly limited to SageMaker IAM preflight, gives little explicit non-fit guidance, and provides no Chinese-language or mainland-China reachability support, so points are deducted.

4Convention8 / 15 · 2.7/5

The folder contains a SKILL.md, scripts, JSON references, usage guidance, permission notes, limitations, an Apache-2.0 license, and repository CI. It lacks skill-specific versioning, changelog, named maintenance responsibility, and a clear update path, with limited examples and troubleshooting coverage.

5Effectiveness6 / 15 · 2.0/5

It can discover and return a usable execution-role ARN or provide actionable SSO escalation guidance, completing the core preflight task. It only checks existence and trust rather than effective permissions; the creation path uses an overly broad policy and lacks confirmation and recovery, so manual review remains necessary.

6Verifiability4 / 10 · 2.0/5

The supplied files make the logic and policy templates auditable, and repository CI validates generated artifacts and version bumps. There are no committed tests covering this skill's key paths or third-party execution records, so static evidence supports no more than 5 points.

1 2 3 4 5 6

Open a dimension to read why it scored that way

Reviewed Jul 20, 2026 Reviewed revision 86cdeee824b7 Review evidence[1][2][3][4][5][6][7][8][9]

Evidence confidence:Low — Mostly static review, author material or a limited demo; useful for discovery, not high-risk decisions.

See the full review method →

FAQ

Does the skill automatically create an IAM role?
Only when no usable role is discovered and the user has IAM creation permissions, using the documented create_role.py helper. It explicitly prohibits blindly calling iam:CreateRole.
Does it verify every SageMaker permission?
No. It verifies role existence and the SageMaker trust policy. Deployment-time errors are expected to identify missing action permissions when deeper analysis is needed.
What should an SSO user do when no role exists?
Stop rather than retrying unrelated IAM operations. Ask an AWS administrator for a SageMaker execution-role ARN or for iam:CreateRole, iam:AttachRolePolicy, and iam:PutRolePolicy.
What is the Windows requirement?
Run the Python helper directly in the PowerShell environment where AWS CLI identity works; do not route it through WSL, Git Bash, or another Bash shim.

More skills from this repository

All from huggingface/skills

Automation & Ops

AWS Context Discovery

Resolve the active AWS environment before any account operation.

★ 11k FS 50 Use with care 18d ago
Automation & Ops

SageMaker Python Environment Setup

Build an isolated, version-aligned Python environment for SageMaker and AWS automation.

★ 11k FS 49 Use with care 18d ago
Automation & Ops

SageMaker Production Defaults

Deploy SageMaker real-time or async endpoints with autoscaling, CloudWatch alarms, and consistent tagging built in.

★ 11k FS 46 Use with care 18d ago
Dev & Engineering

Gradio Interactive App Builder

Build Gradio web interfaces, machine-learning demos, and chat apps in Python.

★ 11k FS 40 Not recommended 18d ago
Dev & Engineering

Hugging Face ZeroGPU Builder

Build dependable Gradio AI demos and GPU workloads on Hugging Face ZeroGPU.

★ 11k FS 56 Use with care 18d ago
Automation & Ops

SageMaker Deployment Planner

Choose a practical Amazon SageMaker deployment path for your model, traffic pattern, and latency needs.

★ 11k FS 50 Use with care 18d ago
Dev & Engineering

LoRA Space Demo Builder

Build and publish a tailored Gradio Space for a Hugging Face LoRA.

★ 11k FS 51 Use with care 18d ago
Dev & Engineering

Hugging Face Spaces Builder

Build, deploy, debug, and maintain machine-learning apps on Hugging Face Spaces.

★ 11k FS 50 Use with care 18d ago
Data & Analysis

Hugging Face LLM Trainer

Train, fine-tune, and preserve models on Hugging Face cloud GPUs.

★ 11k FS 48 Use with care 18d ago
Automation & Ops

SageMaker Serving Image Selector

Choose a compatible SageMaker serving container and retrieve the current regional image URI for a Hugging Face model.

★ 11k FS 47 Use with care 18d ago
Dev & Engineering

Hugging Face Hub CLI Skill

Give agents command-line control over Hugging Face Hub models, datasets, Spaces, jobs, and infrastructure.

★ 11k FS 42 Not recommended 18d ago
Dev & Engineering

Hugging Face API Tool Builder

Turn Hugging Face API calls into reusable, composable command-line tools.

★ 11k FS 41 Not recommended 18d ago
Data & Analysis

Hugging Face Dataset Explorer

Explore, query, and extract Hugging Face datasets through the Dataset Viewer API.

★ 11k FS 49 Use with care 18d ago
Dev & Engineering

Hugging Face Paper Research Assistant

Read AI papers and retrieve structured metadata from Hugging Face paper pages.

★ 11k FS 49 Use with care 18d ago
Data & Analysis

TRL Language Model Trainer

Train and fine-tune transformer language models with TRL’s CLI for SFT, preference alignment, and reinforcement learning.

★ 11k FS 48 Use with care 18d ago
Data & Analysis

Hugging Face Local Evaluator

Run controlled inspect-ai or lighteval evaluations for Hugging Face Hub models on local hardware.

★ 11k FS 47 Use with care 18d ago
Data & Analysis

Sentence Transformers Training Assistant

Train retrieval, similarity, reranking, and sparse-search models with Sentence Transformers.

★ 11k FS 47 Use with care 18d ago
Data & Analysis

Transformers.js Inference Skill

Run Hugging Face models directly inside JavaScript applications.

★ 11k FS 46 Use with care 18d ago
Data & Analysis

Hugging Face Model Memory Estimator

Estimate inference memory without downloading model weights.

★ 11k FS 44 Not recommended 18d ago
Dev & Engineering

Hugging Face Local Model Runner

Choose compatible GGUF quantizations from Hugging Face and run them locally with llama.cpp.

★ 11k FS 44 Not recommended 18d ago

Related skills