hf-cloud-aws-context-discovery

Discover the active AWS profile, region, account, and caller identity before AWS work.

507|40|Updated Apr 26, 2026
One-click install
npx skills add https://github.com/waybarrios/opencode-power-pack --skill hf-cloud-aws-context-discovery-waybarrios
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: hf-cloud-aws-context-discovery
Source: https://github.com/waybarrios/opencode-power-pack/tree/main/skills/hf-cloud-aws-context-discovery
Command: npx skills add https://github.com/waybarrios/opencode-power-pack --skill hf-cloud-aws-context-discovery-waybarrios

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Before running SageMaker or other AWS operations, agents often guess regions, miss profile overrides, or fail mid-deployment on IAM errors. This Skill reads the local AWS configuration up front so every subsequent command uses the correct profile, region, and account context. ## Core Features & Use Cases - Profile and Region Resolution: Resolves the active profile from AWS_PROFILE or user input, and the region from a strict precedence chain (explicit user input, AWS_REGION, AWS_DEFAULT_REGION, ~/.aws/config) with no hardcoded defaults. - Credential and Identity Validation: Runs aws sts get-caller-identity to confirm credentials work and capture the account ID and caller ARN. - SSO Principal Detection: Identifies SSO assumed-role principals from the ARN pattern and warns early that IAM role creation will likely fail, preventing confusing mid-deployment errors. - Use Case: Before deploying a SageMaker training job, run this Skill to confirm you are in profile 'ml-team', region 'eu-west-1', account '123456789012', and learn immediately that your SSO session cannot create IAM roles. ## Quick Start Discover my current AWS profile, region, account, and caller identity before we start any SageMaker work.

Frequently Asked Questions about hf-cloud-aws-context-discovery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find my current AWS profile and region from the CLI?▼

Run aws configure list to see the effective profile and region after environment variable overrides. The region resolves in order: explicit user input, AWS_REGION, AWS_DEFAULT_REGION, then the region field in ~/.aws/config.

How do I check which AWS account and identity I am authenticated as?▼

Run aws sts get-caller-identity with your profile and region. It validates credentials and returns the account ID and caller ARN in one call, which you need for constructing ARNs and checking principal type.

Why does iam:CreateRole fail when I am logged in with AWS SSO?▼

SSO sessions use assumed-role credentials (arn:aws:sts::<acct>:assumed-role/AWSReservedSSO_...) that typically lack IAM write permissions. You must use an existing IAM role or ask your AWS access administrator to create one.

Should I fall back to us-east-1 when no AWS region is configured?▼

No. This Skill explicitly forbids hardcoded region defaults. If the user input, environment variables, and ~/.aws/config all lack a region, ask the user directly instead of guessing.

When should I not use AWS context discovery?▼

Skip it for cloud-agnostic model planning or tasks that never touch AWS APIs. It is only needed when local AWS context is required or unspecified before SageMaker or other AWS operations.