Aller au contenu
Skillpedia
Déploiement et cloud (DevOps)11k · #11766

hf-cloud-aws-context-discovery

Ce qu’il fait

Cette compétence vérifie quels compte, profil et région AWS l'IA doit utiliser avant d'effectuer un travail cloud. Elle s'adresse aux personnes qui mettent en place des déploiements de machine learning sur Amazon Web Services.

Quand l’utiliser

  • ✓Quand vous commencez une tâche AWS, comme un déploiement sur SageMaker ou un appel aux API AWS.
  • ✓Quand vous n'avez pas précisé quel profil ou quelle région AWS utiliser.
  • ✓Quand vous dites par exemple « utilise mon compte AWS », et que l'agent a besoin des bons détails du compte.

Lien du skill

https://github.com/huggingface/skills/blob/main/skills/hf-cloud-aws-context-discovery/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/huggingface/skills/blob/main/skills/hf-cloud-aws-context-discovery/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Utilise mon compte AWS pour mettre en place un déploiement SageMaker, et dis-moi quel profil et quelle région tu as trouvés.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'IA lit vos paramètres AWS locaux, comme le profil actif et la région, et lance une vérification d'identité simple. Elle ne devine pas de région et ne vous demande que si vos paramètres n'en fournissent pas.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

AWS Context Discovery

Before doing any AWS work, read the user's local AWS config. Don't guess the region, and don't ask the user for things their config already answers.

What to discover

Run these at the start of the AWS work and remember the results for the rest of the session.

1. Active profile

AWS_PROFILE env var, else default. If the user mentioned a profile in their prompt, that overrides. If the named profile doesn't exist in ~/.aws/config, surface that clearly.

2. Region

Resolution order — stop at the first one that produces a value:

  1. Region the user explicitly named in this conversation
  2. AWS_REGION env var
  3. AWS_DEFAULT_REGION env var
  4. region field on the active profile in ~/.aws/config
  5. Ask the user — but only after the first four have failed

Do not fall back to us-east-1 or any other hardcoded default.

3. Credentials, account ID, caller ARN

aws sts get-caller-identity --profile <profile> --region <region>

Three purposes in one call: confirms credentials are valid (stop if not), returns the Account ID (needed for ARN construction), returns the Arn of the caller.

4. Identify SSO / assumed-role principals

The Arn field tells you what kind of principal this is. The pattern matters because it determines what IAM operations the caller can do.

ARN pattern Type IAM write capability
arn:aws:iam::<acct>:user/<name> IAM user Depends on attached policies
arn:aws:sts::<acct>:assumed-role/AWSReservedSSO_<...>/<email> SSO assumed-role Typically none — can't create/modify IAM roles
arn:aws:sts::<acct>:assumed-role/<role>/<session> Regular assumed-role Depends on the role

If the caller is SSO, surface this immediately before later skills hit iam:CreateRole and fail:

Heads up: you're authenticated via SSO (AWSReservedSSO_<PermissionSet>_...). SSO principals usually can't create IAM roles directly. If we need a SageMaker execution role, I'll look for an existing one first — if none exists, you'll need to ask whoever manages your AWS access to create one.

This is the highest-leverage thing this skill does. Surfacing it now turns a confusing mid-deployment error into a five-second conversation.

Commands to run

# Effective profile and region (faster than parsing config files)
aws configure list

# Validate credentials and get identity
aws sts get-caller-identity
aws sts get-caller-identity --profile <profile-name>  # if a profile was named

aws configure list handles env-var overrides and shows the resolved effective values. Prefer it over parsing ~/.aws/config yourself. If you need to read raw config (e.g. to list profiles), ~/.aws/config and ~/.aws/credentials are plain INI files — read-only.

What to report back

One or two lines, not a wall of text:

Working with profile my-profile in eu-west-1, account 123456789012. You're authenticated via SSO, so we'll need to use an existing IAM role rather than create one.

Don't ask the user to confirm the region you just read from their config — they configured it; that is the confirmation.

If something is wrong (credentials expired, profile doesn't exist, no region anywhere), stop and surface the specific error before continuing.

Questions fréquentes

Se rabat-elle sur une région par défaut ?

Non. Elle utilise vos paramètres ou la région que vous avez indiquée, et ne suppose aucune valeur par défaut codée en dur.

Que se passe-t-il si mon profil n'existe pas ?

La compétence l'indique clairement, pour que vous puissiez corriger le profil avant le début du travail.

Vérifie-t-elle que je suis connecté ?

Oui. La vérification d'identité confirme que vos identifiants sont valides avant la suite du travail.

Détails

Description originale de l’auteur

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 has not specified a region or profile explicitly, when they say things like "use my AWS account", "deploy to AWS", "use my profile", or when about to make any AWS CLI or SDK call. Never guess the region or account ID — always use this skill to read it from the local configuration first.

repo: huggingface/skills

Popularité

Étoiles GitHub
11k
Position au classement
#11766
Licence
Apache-2.0
Mis à jour
30/10/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires