opensite-ai/opensite-skills / aws-ai-ml
aws-ai-ml
VerifiedSelects, deploys, and customizes AI models on Amazon SageMaker. Training or Processing jobs, fine-tuning (SFT/DPO/RLVR/RLAIF), model selection, dataset preparation, evaluation, SageMaker or Bedrock deployment, inference optimization and endpoint diagnostics. Covers the full lifecycle from planning through production. Use when fine-tuning models on SageMaker, choosing which base model to customize, fine-tune, or deploy from SageMaker JumpStart or Hub, SageMakerPublicHub, or the SageMaker public model catalog, transforming or validating training data, evaluating model quality, deploying or optimizing endpoints, configuring IAM/S3 for training, or managing SageMaker Managed MLflow. Use for endpoint health, failures, latency, logs, metrics, errors. Covers Serverless Model Customization, Nova and OSS deployment paths, and PySDK v3. NOT for Ground Truth labeling, Feature Store, or general-purpose AWS infrastructure.
references/sdk-getting-started/references/execution-role-setup.md
View on GitHub# Execution Role Setup
## Resolve
Auto-detect the execution role by running:
```
python -c "from sagemaker.core.helper.session_helper import get_execution_role; print(get_execution_role())"
```
If it succeeds, store the printed ARN as ROLE_ARN and continue to Validate.
If it fails (user is not authenticated as a role, or credentials are missing), ask the user for their execution role ARN:
> What IAM role should SageMaker use to run jobs? I need the full ARN (e.g., `arn:aws:iam::123456789012:role/MySageMakerRole`). This must be an IAM role (not an IAM user).
>
> If you don't have one yet, see: https://docs.aws.amazon.com/sagemaker/latest/dg/model-customize-open-weight-prereq.html
Store the user-provided ARN as ROLE_ARN, continue to Validate.
## Validate
Extract role name from ROLE_ARN and run:
```
aws iam get-role --role-name <ROLE_NAME>
```
- **AccessDenied** → warn: "⚠️ Cannot verify role (missing iam:GetRole). Proceeding with unverified role." Continue.
- **Role found** → check `AssumeRolePolicyDocument` for trust principals:
- `sagemaker.amazonaws.com` missing → STOP. Tell user their role needs `sagemaker.amazonaws.com` in the trust policy. Link to [the SageMaker model-customization prerequisites documentation](https://docs.aws.amazon.com/sagemaker/latest/dg/model-customize-open-weight-prereq.html).
- `bedrock.amazonaws.com` missing → WARN: "Role missing bedrock trust. Bedrock steps may fail."
- `lambda.amazonaws.com` missing (and plan includes RLVR) → WARN: "Role missing lambda trust. RLVR reward functions will fail."
## Required Permissions
Attach the `AmazonSageMakerModelCustomizationCoreAccess` managed policy to your SageMaker AI execution role. This policy covers the permissions needed for model customization — serverless training, custom reward-function RL, model evaluation, and deployment to SageMaker AI or Bedrock endpoints.
For full setup instructions (including separate scoped-down roles for Lambda and Bedrock), see: https://docs.aws.amazon.com/sagemaker/latest/dg/model-customize-open-weight-prereq.html
**S3 caveat:** The managed policy only grants S3 access to buckets with "sagemaker" in the name. If your data is in other buckets, add a supplemental S3 policy.
## Troubleshooting
### "Access denied when attempting to assume role"
The role's trust policy is missing the required service principal. Add `sagemaker.amazonaws.com` to the trust policy.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |