# Hf Cloud Sagemaker Production Defaults

Create a SageMaker endpoint (real-time, real-time scale-to-zero, or async) with...

- Repository: https://github.com/huggingface/skills (11249 stars)
- Category: DevOps
- License: Apache-2.0
- Last updated: 2026-10-30
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add huggingface/skills --skill hf-cloud-sagemaker-production-defaults -g -a claude-code -y`
Codex: `npx skills add huggingface/skills --skill hf-cloud-sagemaker-production-defaults -g -a codex -y`
Cursor: `npx skills add huggingface/skills --skill hf-cloud-sagemaker-production-defaults -g -a cursor -y`
Gemini CLI: `npx skills add huggingface/skills --skill hf-cloud-sagemaker-production-defaults -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add huggingface/skills`

## Description

Create a SageMaker endpoint (real-time, real-time scale-to-zero, or async) with autoscaling, CloudWatch alarms, and tagging enabled by default. Use this skill whenever about to create a SageMaker endpoint, write deployment code that calls `create_endpoint`, or finalize a deployment after the image URI and IAM role are known. Provides deploy.py for real-time endpoints, deploy_ic.py for real-time endpoints that scale to zero instances via inference components, and deploy_async.py for async endpoints (also scale-to-zero). This is the last step in the SageMaker deployment workflow. Never generate a bare `create_endpoint` call without these defaults, endpoints without autoscaling or alarms are demos, not deployments.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# SageMaker Production Defaults

The difference between a demo endpoint and one you can leave running is: it scales with traffic, it tells you when it breaks, and you can debug it later. This skill makes those three the default rather than optional extras.

By the time this skill runs, the planner has chosen a real-time endpoint, IAM has a usable role, and image-selection has resolved a container URI + AMI version. This skill turns those into an actual deployment.

## What gets created

For every endpoint, the skill creates these as a unit:

1. **SageMaker Model**, image + env vars + execution role + S3 artifacts
2. **Endpoint config**, instance type, initial count, optional data capture
3. **Endpoint**, the real-time endpoint serving inference
4. **Autoscaling target + policy**, target tracking on invocations per instance
5. **CloudWatch alarms**, latency, errors, platform overhead

An inference-component deployment (`deploy_ic.py`) creates the same set with two changes: the endpoint config carries the execution role and `ManagedInstanceScaling`, and an **inference component** carries the model. Its autoscaling target is the component, not the variant.

Data capture (logging requests/responses to S3) is **off by default**, useful for debugging but creates ongoing S3 costs the user didn't necessarily ask for. Enable with `--enable-data-capture`.

All resources get a consistent tag set including `CreatedBy=agentic-deploy-skills` for later cleanup.

Defaults and reasoning in `references/deployment-template.md`.

## Running the deployment

For a text-generation LLM (vLLM), first package the pinned model snapshot as a SageMaker `model.tar.gz` artifact and upload it to an account-controlled S3 bucket. SageMaker extracts it under `/opt/ml/model`, so the deployment does not fetch or execute repository code at runtime:

The rest: https://github.com/huggingface/skills/blob/HEAD/skills/hf-cloud-sagemaker-production-defaults/SKILL.md
