hf-cloud-sagemaker-iam-preflight

Verify or create AWS SageMaker IAM execution roles with AWS CLI.

10.9k|724|Updated Nov 24, 2025
One-click install
npx skills add https://github.com/huggingface/skills --skill hf-cloud-sagemaker-iam-preflight
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hf-cloud-sagemaker-iam-preflight
Source: https://github.com/huggingface/skills/tree/main/skills/hf-cloud-sagemaker-iam-preflight
Command: npx skills add https://github.com/huggingface/skills --skill hf-cloud-sagemaker-iam-preflight

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires awscli, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the verification of an IAM execution role for SageMaker, preventing deployment failures and ensuring that necessary permissions are in place before training or deploying models.

Core Features & Use Cases

  • Role Validation: Checks if an existing IAM execution role is usable and up-to-date.
  • Role Creation: Generates a new IAM execution role with the correct permissions if none exist.
  • Use Case: Before initiating a SageMaker endpoint, model, training job, or any resource that requires an execution role, this Skill can be used to ensure that a valid role is available, reducing common deployment failures.

Quick Start

Validate or create a SageMaker execution role by running the script:

python3 scripts/check_role.py

Frequently Asked Questions about hf-cloud-sagemaker-iam-preflight

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify an IAM execution role for AWS SageMaker?

To verify an IAM execution role for AWS SageMaker, you can automate the validation process using a script that checks if an existing role has the correct trust and permissions policies required for deployment.

Why does my SageMaker training job fail with an IAM role permissions error?

SageMaker training jobs fail due to missing or incorrect IAM role permissions. Automating IAM role verification before deployment ensures necessary permissions are in place, preventing these common deployment failures.

Do I need AWS CLI to create a SageMaker execution role?

Yes, you need AWS CLI installed and configured to perform IAM role operations. The automation script relies on AWS CLI to validate existing roles or create new ones with correct permissions for SageMaker.

Can I automate IAM role creation for SageMaker deployment workflows?

You can automate IAM role creation for SageMaker workflows by running a verification script that generates a new execution role with the correct permissions if no valid role currently exists.

What is the best way to check SageMaker IAM role trust policies before deployment?

The best way to check SageMaker IAM role trust policies is to run automated preflight validation. This verifies existing roles are usable and up-to-date before initiating endpoints, models, or training jobs.