본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)48k · #4806

hf-cloud-aws-context-discovery

하는 일

이 도구는 비밀번호를 드러내지 않고 사용 중인 AWS 설정(프로필, 리전, 계정)을 확인합니다. 또한 사용 중인 접근 방식이 SSO인지 알려 주는데, SSO에는 제약이 있을 수 있습니다.

사용하는 경우

  • ✓AWS 작업을 시작하기 전에.
  • ✓이전 작업이 실패한 이유를 알고 싶을 때.
  • ✓다른 AWS 도구를 사용할 준비를 할 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hf-cloud-aws-context-discovery/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hf-cloud-aws-context-discovery/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 AWS 설정을 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 계정과 설정에 대한 정보를 보여 주는 AWS 명령을 사용하지만, 비밀번호나 비밀 토큰은 드러내지 않습니다. 이미 설정해 둔 정보를 우선적으로 사용합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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.
자주 묻는 질문

'AWS 프로필'은 무엇인가요?

누구인지, 그리고 AWS에 어떻게 접근하는지를 식별하는 설정 묶음입니다. 특정 서비스의 사용자 이름과 비밀번호 같은 역할을 합니다.

왜 비밀번호를 보여 주지 않나요?

중요한 보안 조치이기 때문입니다. 이 도구는 설정에 대한 정보만 보여 주며, 접근을 허용하는 비밀 정보는 보여 주지 않습니다.

'SSO'는 무엇이며 왜 알아야 하나요?

SSO(Single Sign-On)는 한 번의 로그인으로 여러 서비스에 접근하는 방법입니다. 사용 중인지 알면 할 수 있는 일이 제한될 수 있다는 점을 이해하는 데 중요합니다.

상세 정보

작성자의 원본 설명

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

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#4806
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬