nitinjain999/platform-skills/aws-profile
Claude Code and agent skill by nitinjain999/platform-skills
- community
Checking that the SKILL.md file is still in the repository.
Manage AWS profiles for MCP servers — discover SSO, Granted and role-chain profiles, check authentication with STS, switch configured profiles, and scan AWS Organization accounts. TTL is unknown unless the user shares an expiry timestamp without credentials.
Install
npx vskill@latest install nitinjain999/platform-skills/aws-profileSKILL.md
Manage AWS profiles for MCP server configurations across VS Code (GitHub Copilot) and Claude Code.
Reference: references/aws-mcp-profiles.md
Credential boundary
List profiles with aws configure list-profiles. Read only these non-secret settings with aws configure get <key> --profile <profile>: sso_session, sso_start_url, sso_region, sso_account_id, sso_role_name, role_arn, source_profile, region, granted_sso_account_id, granted_sso_role_name. A missing setting is normal. Never retrieve access keys, session tokens, raw config files or credential caches, or execute credential_process to inspect its output. Let the AWS CLI handle authentication for the selected profile.
The AWS CLI continues to use its native credential chain, including credential_process. Keep the SSO, Granted and role-chain authentication setup guidance in references/aws-mcp-profiles.md.
For TTL, use only a profile-specific expiration timestamp the user has shared without credentials. Otherwise display unknown; successful authentication does not establish an expiry time. Parse MCP config files locally and return only server names, paths, AWS_PROFILE and AWS_REGION, since other fields can contain secrets. Do not print entire config files or diffs of unrelated fields.
Interactive Wizard (fires when no mode is provided)
When invoked with no arguments, ask before proceeding:
Q1 — Mode?
Q2 — Mode-specific follow-up (one question, after mode is selected):
- discover:
Any filters? (e.g. --expired to show only expired, --type sso, --env prod) — or press enter to list all: - switch: List profiles with
aws configure list-profiles, then ask:Which profile should MCP servers switch to? - login: List profiles with
aws configure list-profiles, then ask:Which profile needs authentication? - status: no follow-up — proceed directly
- org-scan:
Which management account profile has organizations:ListAccounts permission? (default: current profile):
Then proceed into the relevant mode below.
Mode: discover
List profiles and output a classified profile table with TTL where shared expiration metadata is available.
Output:
The timestamp examples above assume the user supplied profile-specific expiry metadata. Without it, show unknown in both expiry columns.
Steps:
- Run
aws configure list-profiles, then query only the metadata keys in Credential boundary. Classify each profile by the settings present:
- SSO:
sso_sessionorsso_start_urlpresent - Assumed role:
role_arn+source_profile - Granted:
granted_sso_account_idorgranted_sso_role_namepresent; anassumebinary alone does not classify every profile - Static: only if the user identifies it as static → warn to rotate
- Otherwise:
unknown; do not retrieve a key to classify it
- Calculate TTL only from shared expiration metadata for that profile. Do not read credential caches. Apply traffic-light TTL only when a timestamp is known:
- ✓ Green: >30 min
- ⚠ Amber: 10–30 min
- ✗ Red: <10 min or expired
- Read
~/.aws-profile-tags.yamlfor env tags. If the file does not exist, generate a starter file:
``yaml # ~/.aws-profile-tags.yaml — edit to correct heuristic guesses prod-platform-eu: prod # detected: name contains 'prod' staging-assume: staging # detected: name contains 'stag' dev-sandbox: dev # detected: name contains 'dev' security: shared-services # detected: name contains 'security' ` Print: Generated ~/.aws-profile-tags.yaml — review and correct environment tags.`
- Apply filters if flags provided. For
--expired, list confirmed expired entries and report profiles with unknown TTL separately; unknown does not mean expired or healthy.
With `--chain` — show full role assumption chain for assumed-role profiles:
Follow source_profile → role_arn links recursively with the metadata lookups above.
Reference: references/aws-mcp-profiles.md → Profile Type Detection, Credential Lifecycle
Mode: status
Show which profile each configured MCP server uses, authentication status and known credential TTL. Report refresh behaviour only when the configured method is known.
Note: MCP config identifies the intended profile; it does not prove which credentials an already-running server holds. Do not inspect credential caches or assume the agent's shell environment matches the server's.
Output:
Steps:
- Extract only server names and the AWS profile/region fields from
~/.vscode/mcp.json,~/.claude/settings.json, and.vscode/mcp.json(if present in cwd), using local parsing. - For each unique profile, run
aws sts get-caller-identity --profile <profile>to check authentication; report errors without treating every failure as an expired token. Report TTL from shared metadata orunknown. - Identify SSO or role-chain settings with the allowed metadata lookups.
AWS_PROFILEalone does not establish whether a particular server's SDK refreshes credentials; report that as unverified unless checked. - If
--watch: re-run every 60 seconds. Apply TTL warnings only to known timestamps. Report authentication failures separately.
Mode: switch
Patch AWS_PROFILE (and AWS_REGION if --region provided) in MCP server config files. Requires --confirm for any profile tagged prod or whose name contains prod or production.
Examples:
Pre-condition: If ~/.aws-profile-tags.yaml does not exist, run aws-profile discover first to generate it.
Steps:
- Resolve target profile:
- If
--env <tag>: look up the profile in~/.aws-profile-tags.yamlthat matches the tag — this selects which profile to switch to, not which servers to patch. Error if multiple profiles share the tag — require explicit profile name. - Otherwise: use the profile name directly.
- Safety check — if profile name contains
prodorproductionor is taggedprodin~/.aws-profile-tags.yaml:
`` ⚠ WARNING: Switching to prod-platform-eu (tagged: prod, Account: 123456789). MCP operations will run against production. Pass --confirm to proceed. ` Halt without --confirm`.
- Determine target files by
--scope:
global(default):~/.vscode/mcp.json+~/.claude/settings.jsonworkspace:.vscode/mcp.jsonin current directory only--server <name>: patch only that named entry, searching all scope files regardless of--scope(overrides scope)
- For each matched server entry, update
env.AWS_PROFILEto the new profile. If--regionprovided, also updateenv.AWS_REGIONand any--regionarg in theargsarray.
- Show a diff of what was patched:
`` Patched 3 server entries: eks-prod-eu ~/.vscode/mcp.json AWS_PROFILE: old-profile → prod-platform-eu cloudwatch ~/.claude/settings.json AWS_PROFILE: old-profile → prod-platform-eu eks-staging .vscode/mcp.json AWS_PROFILE: old-profile → prod-platform-eu ``
- Always emit restart instructions:
`` ⚠ Restart required — config changes do not affect running server processes: VS Code / Copilot: Cmd+Shift+P → "MCP: Restart Server" (or: Developer: Reload Window) Claude Code: exit this session and start a new one ``
Reference: references/aws-mcp-profiles.md → Config File Locations, Prod Safety
Mode: login
Detect the profile type and emit the correct authentication command. After successful login, run status automatically.
Steps:
- Query the allowed metadata keys for the selected profile. If the method is unknown, ask which authentication method the user configured instead of inspecting credentials.
- Emit and explain the auth command:
SSO: ``` aws sso login --profile prod-platform-eu
This opens a browser for SSO authentication. After approval, your token is cached in ~/.aws/sso/cache/ (TTL: 8–12h, org-configured). ```
Granted: ``` assume prod-platform-eu
Granted will authenticate via SSO and cache credentials. If prompted for duration, 4h is a reasonable default for a workday session. ```
Assumed role: ``` The source profile 'dev-sso' must be authenticated first: aws sso login --profile dev-sso
Then validate the role assumption: aws sts get-caller-identity --profile staging-assume ```
Static: `` ⚠ Static credentials do not have a login flow — they are long-lived and do not expire cleanly. Recommendation: Rotate this profile to AWS SSO (IAM Identity Center). See: references/aws-mcp-profiles.md → Auth Flows ``
- After the user completes login, check the selected profile with
aws sts get-caller-identity --profile <profile>. Report TTL asunknownunless the user shared an expiration timestamp; a successful STS check does not prove a green (>30 min) TTL.
Reference: references/aws-mcp-profiles.md → Auth Flows
Mode: org-scan
List all accounts in the AWS Organization and cross-reference with configured profiles. Requires organizations:ListAccounts permission — available only from the management account or a delegated admin account.
Output:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/aws-profile/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/nitinjain999/platform-skills/aws-profile)