/aws:awsfrom aws
Settles the AWS account, region and identity in use, guides sign-in (SSO, aws login), and covers IAM (AccessDenied, policies, trust policies, STS limits), cost-query habits and AWS CLI v2 quirks (pagination, dry runs, env keys vs profile). Use for AWS credentials, SSO, expired tokens, IAM, AccessDenied, AWS costs, truncated aws output, or before an aws write command. Not for listing resources (aws-resource-query), incidents (aws-cloudwatch), reviews (aws-well-architected), IaC (terraform).
Ships in aws. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
General AWS habits: know which account and region you are in, get signed in without touching credential files, write IAM that fails closed, and query costs without arithmetic mistakes. Detail that does not fit here is in references/ (cli.md, cost.md, iam-edge-cases.md).
When the account, region or identity is unknown, unclear or looks wrong, settle these before acting and keep them for the session. If the user already named them and calls work, skip this.
AWS_PROFILE, else default. aws configure list-profiles shows what exists.AWS_REGION, AWS_DEFAULT_REGION, aws configure get region --profile <profile>. Then ask. Never fall back to us-east-1. IAM, Route 53 and CloudFront are account-wide, so region does not matter for them.aws sts get-caller-identity --profile <profile> --region <region>. It needs no permission, so it works even when other calls are denied.Profile dev, eu-west-1, account 123456789012, assumed-role AWSReservedSSO_PowerUser_.... Do not ask the user to confirm a region you read from their config.Read the caller Arn for the principal type:
| Arn contains | Meaning |
|---|---|
:user/ | IAM user. Rights depend on attached policies. |
:assumed-role/AWSReservedSSO_<PermissionSet>_.../ | IAM Identity Center (SSO). Rights are the permission set's. AdministratorAccess can manage IAM; narrower sets such as PowerUserAccess often cannot. |
:assumed-role/<role>/<session> | Assumed role. Rights depend on the role. |
For an SSO principal, say early that creating IAM roles may fail. Look for an existing role before planning to create one, and if none fits, name the missing permission for whoever administers access.
Do not run aws configure list (it masks keys to their last four characters but still shows part of them) or aws configure export-credentials (it prints them in full). Never read ~/.aws/credentials, ~/.aws/config or the SSO cache. Never print an access key, secret key or session token, in output or in an example.
The user runs every login. A login opens a browser, so tell them the exact command and wait. In Claude Code the user can run it in this session by typing ! aws sso login --profile <profile>. Afterwards re-run get-caller-identity.
| Situation | Command |
|---|---|
| Profile uses IAM Identity Center (SSO) | aws sso login --profile <profile>. Do not steer an SSO user to aws login. |
| No SSO: IAM user, root, or IAM federation | aws login (CLI 2.32.0 or later; check aws --version). Sessions last up to 12 hours. Add --profile <name> to keep an existing default, and --remote when no browser is available. |
Permission error right after aws login | The identity needs the SignInLocalDevelopmentAccess managed policy. Root does not. |
| CI or automation | OIDC federation or an IAM role, never a person's login or long-lived keys. |
Offer aws configure with long-term access keys only if the user declines aws login and has no SSO. Say that keys never expire on their own. The user runs aws configure themselves; never ask for keys in chat.
An expired or missing session shows as ExpiredToken, Unable to locate credentials or "token has expired". Ask for a login. Do not switch profiles or roles to work around it.
Debug AccessDenied from the message first: it names the action and resource. Then check, in order: wrong account or role (get-caller-identity), an explicit deny, or an allow missing from the permissions boundary, SCP or session policy, and missing required actions (dynamodb:BatchExecuteStatement needs the PartiQL actions). Read-only helpers: aws iam simulate-principal-policy, aws iam get-role, aws iam list-attached-role-policies.
Writing policies:
dynamodb:Query, not QueryItems).Resource to ARNs. Add conditions only for sensitive actions, tag-based access, or org requirements.iam:PassRole on * combined with a create or update on a compute service (EC2 RunInstances, Lambda CreateFunction, ECS RegisterTaskDefinition) lets the caller run code as any passable role. Scope it to role ARNs or a path, and add iam:PassedToService.ForAllValues is true when the key is absent, so in an Allow pair it with "Null": {"<key>": "false"}. ForAnyValue is false when the key is absent, so a Deny on it misses requests without the key. Use these only with multivalued keys such as aws:TagKeys.aws:SourceAccount or aws:SourceArn. Third parties assuming the role get sts:ExternalId.GetSessionToken credentials cannot call IAM APIs unless MFA was supplied, and can call only AssumeRole and GetCallerIdentity among STS operations.Read references/iam-edge-cases.md for the same-account resource-policy bypass of boundaries, STS Region details, and what was checked.
Cost data is easy to get plausibly wrong. Read references/cost.md before the first Cost Explorer, Budgets or Compute Optimizer call. The short form:
date -u +%F) before choosing any --time-period. Do not assume the year.End is exclusive: one month is Start=<first-of-month>,End=<first-of-next-month>.RECORD_TYPE, not CHARGE_TYPE. Pass --region us-east-1.compute-optimizer update-enrollment-status opts the account in. It is a change, so ask first.Spend analysis and savings reviews of a whole workload go to aws-well-architected.
Before any create, update, delete, launch, terminate, put or attach command, show the exact command and wait for the user's go-ahead; pass --region explicitly. For truncated output, wrong credentials despite --profile, retries, waiters or a script, read references/cli.md.
| The user wants | Use |
|---|---|
| What exists, how a resource is configured | aws-resource-query |
| An alarm fired, errors, latency, what changed | aws-cloudwatch |
| A Well-Architected or cost review of a workload | aws-well-architected |
| Terraform or other IaC | terraform |
If a named skill is not installed, say so and carry on with the AWS CLI.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub adminhead/claude-plugins --plugin aws