Skip to content

SageMaker IAM Preflight

Finds or checks an AWS SageMaker execution role before deploying, creating one only when needed.

Stars
11,253
Licence
Apache-2.0
Files
5 files

What it does

SageMaker needs an AWS permission role (an 'execution role') that lets it read model files, pull container images and write logs. This skill makes the agent first look for an existing usable role in your AWS account, validate it, and only then try to create a new one. It also tells the agent to stop and ask an administrator when you lack the permissions to create roles, instead of repeatedly failing.

Great for

  • Developers deploying or training models on AWS SageMaker who are unsure which IAM role to use
  • Teams whose users sign in through AWS SSO and lack IAM write permissions
  • People hitting AccessDenied errors on IAM actions during SageMaker setup

Skip it if

  • Anyone without AWS credentials or SageMaker work in progress, since the helpers only run against a live AWS account
  • Production accounts where role creation must go through change control: the create script can add IAM roles and policies directly, so review it first
  • Non-AWS machine learning platforms, where the skill has no use

Try asking

  • “Before deploying my model to a SageMaker endpoint, find me a usable execution role in my account.”
  • “Check that the role arn:aws:iam::123456789012:role/MySageMakerRole can be used by SageMaker.”
  • “My SageMaker training job failed with AccessDenied on iam:CreateRole; help me sort out the role setup.”
Step-by-step guide: how to use SageMaker IAM PreflightInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 5 original files, the Apache-2.0 licence and an attribution note.

    hf-cloud-sagemaker-iam-preflight.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip hf-cloud-sagemaker-iam-preflight.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip hf-cloud-sagemaker-iam-preflight.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Run the helper scripts from the same shell where the AWS CLI already works; Git Bash or WSL on Windows often lack your AWS config.
  • Pass the model S3 bucket name to create_role.py so the inline policy is scoped rather than left as a placeholder.
  • Review references/minimum-permissions.json and the chosen role's policies before deployment rather than attaching broad managed policies.

What's inside

  • references/minimum-permissions.json
  • references/trust-policy.json
  • scripts/check_role.py
  • scripts/create_role.py
  • SKILL.md

Redistributed unmodified from huggingface/skills under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.