Skip to content
Development
Skill

/aws-profile

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.

From plugin
platform-skills
7252 skills2 agents

Claude Code

$ npx -y skills add nitinjain999/platform-skills --skill aws-profile --agent claude-code

SKILL.md

aws-profile.SKILL.md
name: aws-profile
description: 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.
argument-hint: "[discover|status|switch <profile>|login <profile>|org-scan] [flags]"
title: "AWS Profile Command"
sidebar_label: "aws-profile"
custom_edit_url: null

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?**

What do you need?
  1. discover  — list AWS profiles with type, account ID, env tag, and expiry when shared
  2. status    — show configured MCP profiles and check current authentication
  3. switch    — update MCP config files to use a different profile
  4. login     — authenticate and refresh credentials for a specific profile
  5. org-scan  — list all AWS Organization accounts and cross-reference with configured profiles

Enter 1–5 or mode name:

**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.

aws-profile discover [--type sso|assume-role|granted|static] [--env prod|staging|dev] [--account <id>] [--chain] [--expired]

**Output:**

Profile               Type         Account ID    Env Tag    Permission Set    Expires      TTL
prod-platform-eu      sso          123456789     prod       PowerUser         14:32 UTC    47m ✓
staging-assume        assume-role  456789123     staging    -                 13:58 UTC    13m ⚠
dev-sandbox           granted      987654321     dev        Developer         09:00 UTC    EXPIRED ✗
security              unknown      890123456     -          -                 unknown      unknown

The timestamp examples above assume the user supplied profile-specific expiry metadata. Without it, show `unknown` in both expiry columns.

**Steps:**

1. Run `aws configure list-profiles`, then query only the metadata keys in Credential boundary. Classify each profile by the settings present:

  • SSO: `sso_session` or `sso_start_url` present
  • Assumed role: `role_arn` + `source_profile`
  • Granted: `granted_sso_account_id` or `granted_sso_role_name` present; an `assume` binary 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

2. 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

3. Read `~/.aws-profile-tags.yaml` for env tags. If the file does not exist, generate a starter file:

   # ~/.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.`

4. 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:

staging-assume role chain:
  dev-sso (identity: 111111111)
    └── assume → security-role (222222222)
        └── assume → staging-platform (456789123)  ← this profile

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

Read more
@nitinjain999
Ships withplatform-skills

A production-grade field handbook for platform, DevOps, SRE, and cloud engineers covering Kubernetes, Flux CD, Terraform, GitHub Actions, AWS, OPA/Rego, KEDA, Karpenter, supply chain security, Falco, observability, and more.

7252 skills2 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
72
Star history of nitinjain999/platform-skills on GitHub, a chart by star-history.com

Other skills on platform-skills.

aws

aws

Structured guidance for AWS CloudFront distributions, WAF web ACLs, Lambda@Edge, CloudFront Functions, Firewall Manager…

azure

azure

Azure identity (Workload Identity, OIDC, Entra ID), resource tagging, AKS platform patterns, RBAC scoping, and…

backup-dr

backup-dr

Back up and restore Kubernetes workloads with Velero, and prove recovery works. Covers Velero on EKS via Flux (IRSA, S3 backup…

chaos

chaos

Design, run, and debug Chaos Engineering experiments on Kubernetes using Litmus Chaos v3 and Chaos Mesh v2. Covers fault…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills3w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc4w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2w252k
@facebook@facebookInstall Skill

Questions about aws-profile.

Which coding agents can use aws-profile?
aws-profile installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.