Aller au contenu
Skillpedia
Déploiement et cloud (DevOps)48k · #4806

hf-cloud-aws-context-discovery

Ce qu’il fait

Cet outil vérifie la configuration AWS que vous utilisez (profil, région, compte) sans révéler vos mots de passe. Il indique aussi si vous utilisez un type d'accès appelé SSO, qui peut comporter des limitations.

Quand l’utiliser

  • ✓Avant de commencer toute tâche AWS.
  • ✓Pour comprendre pourquoi une tâche précédente a échoué.
  • ✓Pour préparer l'utilisation d'autres outils AWS.

Lien du skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/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/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/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

“Vérifie ma configuration AWS.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'outil utilise des commandes AWS qui affichent des informations sur votre compte et votre configuration, sans révéler vos mots de passe ni vos jetons secrets. Il privilégie les informations que vous avez déjà configurées.

Contenu technique (SKILL.md original)

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

AWS Context Discovery

Before doing any AWS work, inspect only masked AWS CLI metadata. Don't guess the region, and don't ask the user for things the CLI already answers. Never open or print ~/.aws/credentials, credential-process output, secret environment variables, access keys, session tokens, or SSO token caches.

When to Use

  • Establish the effective AWS profile, region, account, and caller before AWS work.
  • Diagnose expired SSO sessions, missing profiles, or configuration overrides.
  • Provide verified context to later SageMaker planning and deployment skills.

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

Use a profile the user explicitly named, otherwise use the profile identified by masked AWS CLI metadata. If the named profile is absent from aws configure list-profiles, 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. Region reported by aws configure list --profile "$profile"
  3. Region reported by aws configure get region --profile "$profile"
  4. 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

# Profiles and masked effective metadata; never read credential files directly
aws configure list-profiles
aws configure list --profile "$profile"
aws configure get region --profile "$profile"

# Validate credentials and get identity
aws sts get-caller-identity --profile "$profile" --region "$region"

aws configure list masks credential values and identifies their source. Use these metadata commands instead of parsing AWS files or inspecting secret-bearing environment variables. If the CLI cannot resolve a profile or region without exposing credentials, stop and ask the user for the non-secret profile or region value.

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.

Limitations

  • Discovery may reveal account IDs, role ARNs, or profile names; report only what the task needs and never expose secrets or session tokens.
  • STS identity checks require network access and valid credentials.
  • A valid identity does not imply permission to change resources.
Questions fréquentes

Qu'est-ce qu'un « profil AWS » ?

C'est un ensemble de paramètres qui identifie qui vous êtes et comment accéder à AWS, un peu comme un nom d'utilisateur et un mot de passe pour un service donné.

Pourquoi ne pas afficher mes mots de passe ?

C'est une mesure de sécurité importante. L'outil affiche uniquement des informations sur votre configuration, pas les secrets qui permettent l'accès.

Qu'est-ce que le SSO et pourquoi est-il important de le connaître ?

Le SSO (Single Sign-On, ou authentification unique) permet d'accéder à plusieurs services avec une seule connexion. Savoir si vous l'utilisez est important, car cela peut limiter vos actions, par exemple la création de nouvelles autorisations.

Détails

Description originale de l’auteur

Discover the effective local AWS profile, region, account, and caller identity before any AWS task without exposing credentials.

repo: sickn33/agentic-awesome-skills

Popularité

Étoiles GitHub
48k
Position au classement
#4806
Licence
MIT
Mis à jour
15/10/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires