---
name: aws-profiles
description: Use whenever the user need to run a command on AWS. The skill helps choosing the right profile and invocation method.
---

# AWS Profiles

## Overview

AWS named profiles (`~/.aws/config`) are local credentials. The `aws-mcp` tool runs locally and can access them. Always prefer the AWS MCP with the right profile. If the AWS does not work, than bash can be used.

## When to Use What

| Scenario | Tool |
|----------|------|
| Default credentials / no profile specified | `aws-mcp` (`call_aws`) — preferred |
| Specific named profile | `aws-mcp` with the right profile or `Bash` with `--profile` |
| `AWS_PROFILE` env var already set in shell | Either works |

## Usage

**Bash with explicit profile:**
```bash
aws s3 ls --profile dev
aws ec2 describe-instances --profile prod --region eu-west-1
```

**Or export for the session:**
```bash
export AWS_PROFILE=dev
aws s3 ls
```

## Common Aliases

When the user says a short environment name, map it to the full profile:

| Alias | Profile |
|-------|---------|
| dev, development | `dev` |
| qa, quality, staging | `qa` |
| prod, production | `prod` |

<!-- Add rows for your profiles. Map short names users say to full AWS profile names.
     Example: | shared | `shared-services` | -->

When user mentions "all accounts" or similar, consider performing the request on all environment profiles.

Example: "list buckets in dev" → `aws s3 ls --profile dev` (prefer MCP though)

## Available Profiles (this machine)

Run to list: `aws configure list-profiles`

<!-- Paste your profile list here after running the command above. -->

## Common Mistakes

- Using `aws-mcp` `call_aws` with `--profile` → fails with "config profile not found"
- Forgetting `--region` when the profile's default region differs from the target resource's region
