hf-cloud-sagemaker-deployment-planner
Plan and coordinate the deployment of a model to Amazon SageMaker AI. Use this skill whenever the user wants to deploy, host, serve, or expose a model on SageMaker or AWS — including phrases like "deploy a model", "host this LLM on AWS", "serve this embedding model", "deploy a reranker", "deploy a t
- 0
- Installs
- —
- Rating
- —
- Success rate
- 1
- Files scanned
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 bac0f6366f18cd04… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
SKILL.md
SageMaker Deployment Planner
You are helping a user deploy a model to Amazon SageMaker. Most users invoking this skill want the model deployed with reasonable defaults, in as few questions as possible. Ask only what you need, recommend a pathway honestly, and hand off to the specialized skills.
Workflow phases
- Discovery — what is being deployed and what are the constraints (this skill)
- Pathway selection — real-time / serverless / async / batch / Bedrock CMI (this skill)
- Context preflight —
hf-cloud-aws-context-discovery, thenhf-cloud-python-env-setup - IAM preflight —
hf-cloud-sagemaker-iam-preflight - Image selection —
hf-cloud-serving-image-selection - Deployment —
hf-cloud-sagemaker-production-defaults
Phases 1–2 are this skill's job. The others activate when their patterns match.
Discovery: ask only what you need
You will eventually need to know:
- What model: HuggingFace ID, S3 path to artifacts, or model name. If the user is vague ("the model I fine-tuned"), ask for the artifact location.
- Model type: text-generation LLM, embedding/reranker, or other (classifier, NER, etc.). This determines the serving stack — usually inferable from the model name (anything ending in
-embed-*, starting withBAAI/bge-,sentence-transformers/*etc. is embeddings; chat/instruct models are LLMs). Only ask if it's genuinely ambiguous. - Traffic shape: roughly how often will this be called?
- Latency tolerance: interactive, near-real-time, or async?
- Cost sensitivity: ask only if the user signals it or the traffic pattern is ambiguous.
Region comes from hf-cloud-aws-context-discovery — don't ask unless the user volunteers it.
Do not front-load all of these. A common minimal set is just: what model, and roughly how often will it be called? The model name usually settles the model-type question. That alone is often enough to narrow the pathway to two candidates. If the user already told you something, don't ask again.
Pathway selection
| Pathway | When it fits | When it does not |
|---|---|---|
| Real-time endpoint | Steady traffic, sub-second to few-second latency, always-on | Very spiky or very sparse traffic (wastes money on idle) |
| Real-time, scale to zero | Sparse or scheduled traffic, dev/test endpoints, and a client that tolerates a ~9 min first request after idle | Any interactive SLA: every request during the wake fails with a 400 |
| Serverless inference | Spiky/intermittent, tolerates cold starts (~10s+), simpler models | LLMs above a few B params (memory/cold-start limits), strict SLAs |
| Async inference | Long inference (>60s), large payloads, queue-friendly | Interactive synchronous calls |
| Batch transform | Offline scoring over a dataset | Anything online or interactive |
| Bedrock Custom Model Import | Wants Bedrock-compatible API, supported base family, weights only | Custom inference logic, unsupported architectures |
For LLMs, real-time endpoints are the default unless traffic is explicitly spiky/sparse or inference is long-running. Serverless looks attractive for "low traffic" cases but most LLMs exceed its memory limits.
For embeddings, real-time is again the default — but CPU instances are usually the right choice (much cheaper, fast enough for most embedding workloads). Don't reflexively recommend GPU instances for embedding models; ask hf-cloud-serving-image-selection to consider CPU variants if the model is small (<1B params) and traffic is moderate.
For text-to-image, video generation, or other long-inference workloads (>30s per request) where traffic is also bursty: async inference is the right answer. It supports genuine scale-to-zero between batches and queues requests via S3, so you don't pay for idle GPU. hf-cloud-sagemaker-production-defaults has a dedicated deploy_async.py for this.
Real-time, real-time scale-to-zero, and async are the three scripted pathways (deploy.py, deploy_ic.py, deploy_async.py in hf-cloud-sagemaker-production-defaults). Serverless, batch transform, and Bedrock Custom Model Import are not currently scripted — for those, hand the user off with a brief explanation rather than trying to deploy them through this workflow.
Scale to zero, real-time or async? Both reach zero and both make the first request after idle slow. Pick async when one inference can exceed the 60s InvokeEndpoint limit, when payloads are large, or when the client can accept an S3 result instead of a synchronous response. Pick real-time scale-to-zero when the client needs a normal synchronous HTTP response and can retry through the wake. Real-time scale-to-zero needs inference components; the plain real-time pathway cannot go below one instance.
If two pathways are both reasonable, say so in one sentence each and pick one. Don't bury the recommendation in options.
Instance selection: check quota before recommending
Endpoint quotas are per instance type, per region, and default to 0 for GPU types in many accounts. Recommending an instance the account can't launch wastes a full deploy cycle on ResourceLimitExceeded. Check first:
aws service-quotas list-service-quotas --service-code sagemaker --region <region> \
--query "Quotas[?contains(QuotaName, 'for endpoint usage') && Value > \`0\`].[QuotaName, Value]" \
--output table
If the type you want isn't in the result, recommend one that is — or tell the user to request an increase (hours to days) before creating anything.
If the call itself is denied, say so once and continue. The quota check is an optimization, not a gate: the deployment surfaces the real limit as ResourceLimitExceeded. Never stop the workflow, and never ask the user to change IAM, for a preflight check.
GPU family notes for the common 24 GB tier:
ml.g5.*(A10G) andml.g6.*(L4) both work with current vLLM images when the gpu-3-1 AMI is set (seehf-cloud-serving-image-selection). g6 is the newer generation and slightly cheaper per hour; g5 has roughly double the memory bandwidth, which usually means better LLM token throughput. Pick whichever has quota; when both do, either is defensible — g5 for throughput, g6 for cost.ml.g6e.*(L40S, 48 GB) when the model doesn't fit in 24 GB.
Once you have enough to recommend, state it plainly:
Based on what you've told me, I'd recommend a real-time endpoint on
ml.g5.xlarge. The model is small enough that this is cost-effective, and your traffic pattern is steady enough that you won't be paying for idle. Alternative: serverless would be cheaper if traffic dries up for hours at a time, but Qwen3-0.6B is at the edge of serverless memory limits and cold starts would be 15–30s. Want me to proceed with the real-time endpoint?
Then wait for confirmation. The user should know what they're about to spend money on before you create anything.
The plan lives in the conversation — don't generate plan.yaml or similar artifacts unless explicitly asked.
Style
- Users invoking this skill are deferring to the agent because they don't want to do AWS plumbing. Match that energy: efficient, not exhaustive.
- One round of clarifying questions is usually enough. Three rounds is interrogation.
- When you don't know something specific (current image URI, SDK API surface, quotas), check it rather than guess. Other skills handle the "how to check" details.
- If the user pushes back on a recommendation, accept it. They know their constraints better than you do.
Files
1- SKILL.md
2538e5f7058.4 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from huggingface/skills8
Hugging Face Hub CLI (`hf`) for downloading, uploading, and managing models, datasets, spaces, buckets, repos, papers, jobs, and more on the Hugging Face Hub. Use when: handling authentication; managing local cache; managing Hugging Face Buckets; running or scheduling jobs on Hugging Face infrastruc
Discover the user's local AWS context (active profile, region, account ID, caller identity) at the start of any AWS task. Use this skill before any other AWS work — deploying to SageMaker, creating resources, calling AWS APIs, or anything that touches an AWS account. Use it especially when the user
Set up an isolated Python environment for SageMaker / AWS work, with the right Python version and current boto3. Use this skill whenever Python code will be executed for a SageMaker deployment, training job, or any AWS automation — including when about to run `pip install`, when about to invoke `bot
Ensure a usable SageMaker execution role exists before deploying or training. Use this skill whenever about to create a SageMaker endpoint, model, training job, or any resource that requires an execution role. Use it especially when the user has not provided a role ARN explicitly, when scripts are a
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 U
Pick the right serving container for a SageMaker model deployment and find its current image URI. Use this skill whenever about to deploy a model to a SageMaker endpoint and an image URI needs to be chosen — including when the user says "deploy this LLM", "host this HuggingFace model", "serve this f
Use Hugging Face Hub via MCP server tools. Search models, datasets, Spaces, papers. Get repo details, fetch documentation, run compute jobs, and use Gradio Spaces as AI tools. Available when connected to the HF MCP server.
Hugging Face CLI to estimate the required memory to load Safetensors or GGUF model weights for inference from the Hugging Face Hub
Related devops skillsscan passed
Profile or debug CPU usage and memory allocation in deployed Cloudflare Workers and Durable Objects. Then use this information to optimize your code.
Land and deploy workflow. (gstack)
Deploy tRPC on AWS Lambda with awsLambdaRequestHandler() from @trpc/server/adapters/aws-lambda for API Gateway v1 (REST, APIGatewayProxyEvent) and v2 (HTTP, APIGatewayProxyEventV2), and Lambda Function URLs. Enable response streaming with awsLambdaStreamingRequestHandler() wrapped in awslambda.strea
Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies.
Docker and Docker Compose patterns for local development, hardened CLI installer harnesses, container security, networking, volumes, and multi-service orchestration. Use when creating or reviewing Dockerfiles and Compose services, testing installers across Linux distributions, or planning accurate n
Deploys and manages full-stack web applications (Next.js, Angular) with Server-Side Rendering (SSR) using Firebase App Hosting. Use when deploying Next.js/Angular apps, configuring apphosting.yaml or firebase.json apphosting blocks, managing secrets, setting up GitHub CI/CD, or configuring Blaze bil