hf-cloud-sagemaker-iam-preflight

hf-cloud-sagemaker-iam-preflight is a skill for Codex from PracticalSwan/agent-skills. It costs 131 tokens per session (2,121 once invoked), scanned A, a copy of hf-cloud-sagemaker-iam-preflight, MIT.

A guide for checking that an AWS identity and access management role is ready before creating SageMaker endpoints, models, or training jobs.

In plain words
What is it for?
Use it to find and validate an execution role that SageMaker can use to access model files, containers, and logs.
Why use it?
It prevents failures caused by missing permissions or by trying to create a role that the current login cannot create.

Skill for Codex

Written for Codex: reads ~/.codex or $CODEX_HOME. Also seen: mentions Claude Code; mentions Codex.

Good fit Use it to find and validate an execution role that SageMaker can use to access model files, containers, and logs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/practicalswan/agent-skills/hf-cloud-sagemaker-iam-preflight
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PracticalSwan/agent-skills --skill hf-cloud-sagemaker-iam-preflight
Clone the repo
git clone --depth 1 https://github.com/PracticalSwan/agent-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hf-cloud-sagemaker-iam-preflight

README.md
[![agentmods](https://agentmods.dev/badge/skills/practicalswan/agent-skills/hf-cloud-sagemaker-iam-preflight/github.svg)](https://agentmods.dev/skills/practicalswan/agent-skills/hf-cloud-sagemaker-iam-preflight)
Your own site
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/hf-cloud-sagemaker-iam-preflight"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/hf-cloud-sagemaker-iam-preflight/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hf-cloud-sagemaker-iam-preflight

Your own site · 80×15
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/hf-cloud-sagemaker-iam-preflight"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/hf-cloud-sagemaker-iam-preflight.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 131 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,121 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 86% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00131 $0.02121
Opus 5 $0.00066 $0.01060
Sonnet 5 $0.00026 $0.00424
Haiku 4.5 $0.00013 $0.00212

Measured 2d ago against content hash 87c46d8ae919, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

hf-cloud-sagemaker-iam-preflight scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/check_role.py, scripts/create_role.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

86% identical to hf-cloud-sagemaker-iam-preflight — 55 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

hf-cloud-sagemaker-iam-preflight/SKILL.md · 154 lines

How it starts

The opening of the file, as written. The whole thing — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SageMaker IAM Preflight

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.

Running the helpers (cross-platform)

The helpers are Python so they run identically on Windows, macOS, and Linux:

python3 scripts/check_role.py        # macOS / Linux
python  scripts/check_role.py        # Windows (PowerShell / cmd)

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 python ...\check_role.py directly in PowerShell. If the helper still can't see your identity, run the same discovery natively (see "Native AWS CLI equivalent" below) in the shell where aws sts get-caller-identity returns your ARN.

Order of operations

Step 1 — Did the user provide a role?

Validate that one specifically:

python3 scripts/check_role.py "<role-name-or-arn>"

On success it prints the ARN to stdout (exit 0). On failure it logs why on stderr. Don't try to silently fix a broken role — surface the problem.

Step 2 — Discover existing roles

Read the full file on GitHub · 154 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago Changed 87c46d8ae919
  2. 3d ago Changed 336b614cb996
  3. 6d ago First seen · 154 lines · 131 tokens per session scan A 74124c245ff0

Subscribe to this mod's changes

hf-cloud-sagemaker-iam-preflight is a skill published in the GitHub repository PracticalSwan/agent-skills (14 stars, last pushed 2d ago), licensed MIT. It adds 131 tokens to every session and 2,121 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to hf-cloud-sagemaker-iam-preflight, differing in 55 lines, and is treated as a copy.

Related

Other skills, from other repositories

hugging-face-model-trainer

This skill should be used when users want to train or fine-tune language models using TRL (Transformer Reinforcement Learning) on Hugging Face Jobs infrastructure. Covers SFT, DPO, GRPO and reward modeling training methods, plus GGUF conversion for local deployment. Includes guidance on the TRL Jobs package, UV…

synthetic-sciences/openscience · 131 tokens

aws-genai-ml-architect

Reasoning skill for designing AWS GenAI and ML architectures for healthcare and life sciences workloads. Use when the user asks to choose between SageMaker and Bedrock, design a RAG system over medical literature, architect clinical NLP or medical imaging inference, plan genomics or drug discovery pipelines on AWS…

awslabs/hcls-agent-skills · 189 tokens

tensorrt-llm

High-throughput LLM inference on NVIDIA GPUs.

NousResearch/hermes-agent · 18 tokens

google-cloud-solution-guided-gke-ai-migration

Guides the migration of existing AI workloads (Cloud Run, Gemini API, Gemini Enterprise Agent Platform) to self-hosted GKE inference using gcloud and kubectl. Use when the user has an existing AI inference workload (on Cloud Run, the Gemini API, Gemini Enterprise Agent Platform, or a custom VM) and wants to move it to…

google/skills · 157 tokens

agent-platform-tuning

Agent Platform Model Tuning. Use when you need to fine-tune open models or Gemini models using Agent Platform infrastructure. Don't use for model training outside Agent Platform, model deployment to endpoints (use agent-platform-deploy), or managing serving endpoints (use agent-platform-endpoint-management).

google/skills · 64 tokens

gke-inference

Deploys and optimizes AI/ML inference workloads on GKE, using GPUs, TPUs, and model servers. Use when deploying GKE inference servers, configuring GKE GPU resources for inference, or deploying LLMs on GKE. Don't use for generic batch jobs or HPC task queues (use gke-batch-hpc instead).

google/skills · 74 tokens