AWS Skill
Hard rules
Never destroy data. No delete-*, terminate-*, remove-*, purge-*. No s3 rm. No delete-db-instance. No delete-log-group. If the user needs a destructive command, describe it and let them run it themselves.
Always use a read-only profile. Every command gets --profile <readonly>. Never assume the default profile is safe. If no profile is set, ask before running anything.
Never fetch secrets. No secretsmanager get-secret-value. No ssm get-parameter --with-decryption. Hand the user the command and let them run it privately.
Step 1 — Establish context
Before any command:
- Profile - which one? Ask if unclear.
- Region - always pass
--region explicitly. Never rely on environment defaults.
- Account - if ambiguous, run
aws sts get-caller-identity --profile <profile> first.
Step 2 — Read-side commands
| Service |
Use |
| S3 |
ls, cp (download only), head-object |
| EC2 |
describe-* |
| RDS |
describe-* |
| Lambda |
list-*, get-* |
| ECS |
describe-*, list-* |
| CloudWatch |
get-metric-statistics, filter-log-events, describe-* |
| IAM |
list-*, get-*, simulate-principal-policy |
| DynamoDB |
describe-*, query, get-item |
| Cost Explorer |
get-cost-and-usage |
Step 3 — Format output
--output json # default
--output table # human-readable
--query '...' # filter server-side, not with grep
Example:
aws ec2 describe-instances \
--profile readonly \
--region us-east-1 \
--query 'Reservations[*].Instances[*].{ID:InstanceId,State:State.Name,Type:InstanceType}' \
--output table
Step 4 — Cost awareness
Flag before running anything expensive.
| Situation |
Say |
| DynamoDB full scan |
"Full scans consume read capacity on every item. Add --filter-expression or --limit first?" |
| High-volume CloudWatch log group |
"Add --start-time and --end-time to limit data scanned." |
| Cross-region data transfer |
"Moving data across regions costs money. Confirm the target region." |
IAM rules
- Run
simulate-principal-policy before suggesting any IAM change.
- No
* wildcards in resource ARNs unless explicitly asked. Warn about blast radius.
- Never suggest
AdministratorAccess or PowerUserAccess. Offer least-privilege alternatives.
- Show policies as JSON blocks so the user can review before applying.
Concerns
| Situation |
Say |
| User asks to delete something |
Describe the command. Do not run it. Let them verify first. |
No --region given |
Ask, or use the project's known primary region. |
| Default profile would be used |
"Which profile should I use? Not assuming the default." |
| Production resources targeted |
"This targets production. Confirm before I proceed." |
| User asks to fetch a secret |
"Not retrieving secret values. Run this yourself: aws secretsmanager get-secret-value --secret-id <name>" |
| Results are paginated |
"Page 1 only. Use --starting-token <NextToken> to continue." |
| Cross-account operation |
"This looks cross-account. Confirm the target account ID." |
| Borrowed or assumed credentials |
"Temporary credentials expire. Check aws sts get-caller-identity if you hit auth errors." |
Useful patterns
# Who am I?
aws sts get-caller-identity --profile readonly --output table
# Running EC2 instances
aws ec2 describe-instances \
--profile readonly --region us-east-1 \
--filters "Name=instance-state-name,Values=running" \
--query 'Reservations[*].Instances[*].{ID:InstanceId,Type:InstanceType,IP:PrivateIpAddress}' \
--output table
# Tail Lambda logs
aws logs tail "/aws/lambda/my-function" \
--profile readonly --region us-east-1 \
--follow --since 10m
# Check what a role can do
aws iam simulate-principal-policy \
--profile readonly \
--policy-source-arn arn:aws:iam::123456789012:role/MyRole \
--action-names s3:GetObject ec2:DescribeInstances
1---2name: aws3description: Use this skill whenever the user asks about AWS — querying resources, debugging infrastructure, reading logs, checking costs, IAM, S3, EC2, RDS, Lambda, ECS, CloudWatch, or any other AWS service. Covers CLI commands, SDK calls, and architectural questions.4---56# AWS Skill78## Hard rules9101. **Never destroy data.** No `delete-*`, `terminate-*`, `remove-*`, `purge-*`. No `s3 rm`. No `delete-db-instance`. No `delete-log-group`. If the user needs a destructive command, describe it and let them run it themselves.11122. **Always use a read-only profile.** Every command gets `--profile <readonly>`. Never assume the default profile is safe. If no profile is set, ask before running anything.13143. **Never fetch secrets.** No `secretsmanager get-secret-value`. No `ssm get-parameter --with-decryption`. Hand the user the command and let them run it privately.1516## Step 1 — Establish context1718Before any command:1920- **Profile** - which one? Ask if unclear.21- **Region** - always pass `--region` explicitly. Never rely on environment defaults.22- **Account** - if ambiguous, run `aws sts get-caller-identity --profile <profile>` first.2324## Step 2 — Read-side commands2526| Service | Use |27|---|---|28| S3 | `ls`, `cp` (download only), `head-object` |29| EC2 | `describe-*` |30| RDS | `describe-*` |31| Lambda | `list-*`, `get-*` |32| ECS | `describe-*`, `list-*` |33| CloudWatch | `get-metric-statistics`, `filter-log-events`, `describe-*` |34| IAM | `list-*`, `get-*`, `simulate-principal-policy` |35| DynamoDB | `describe-*`, `query`, `get-item` |36| Cost Explorer | `get-cost-and-usage` |3738## Step 3 — Format output3940```bash41--output json # default42--output table # human-readable43--query '...' # filter server-side, not with grep44```4546Example:47```bash48aws ec2 describe-instances \49 --profile readonly \50 --region us-east-1 \51 --query 'Reservations[*].Instances[*].{ID:InstanceId,State:State.Name,Type:InstanceType}' \52 --output table53```5455## Step 4 — Cost awareness5657Flag before running anything expensive.5859| Situation | Say |60|---|---|61| DynamoDB full scan | "Full scans consume read capacity on every item. Add `--filter-expression` or `--limit` first?" |62| High-volume CloudWatch log group | "Add `--start-time` and `--end-time` to limit data scanned." |63| Cross-region data transfer | "Moving data across regions costs money. Confirm the target region." |6465## IAM rules6667- Run `simulate-principal-policy` before suggesting any IAM change.68- No `*` wildcards in resource ARNs unless explicitly asked. Warn about blast radius.69- Never suggest `AdministratorAccess` or `PowerUserAccess`. Offer least-privilege alternatives.70- Show policies as JSON blocks so the user can review before applying.7172## Concerns7374| Situation | Say |75|---|---|76| User asks to delete something | Describe the command. Do not run it. Let them verify first. |77| No `--region` given | Ask, or use the project's known primary region. |78| Default profile would be used | "Which profile should I use? Not assuming the default." |79| Production resources targeted | "This targets production. Confirm before I proceed." |80| User asks to fetch a secret | "Not retrieving secret values. Run this yourself: `aws secretsmanager get-secret-value --secret-id <name>`" |81| Results are paginated | "Page 1 only. Use `--starting-token <NextToken>` to continue." |82| Cross-account operation | "This looks cross-account. Confirm the target account ID." |83| Borrowed or assumed credentials | "Temporary credentials expire. Check `aws sts get-caller-identity` if you hit auth errors." |8485## Useful patterns8687```bash88# Who am I?89aws sts get-caller-identity --profile readonly --output table9091# Running EC2 instances92aws ec2 describe-instances \93 --profile readonly --region us-east-1 \94 --filters "Name=instance-state-name,Values=running" \95 --query 'Reservations[*].Instances[*].{ID:InstanceId,Type:InstanceType,IP:PrivateIpAddress}' \96 --output table9798# Tail Lambda logs99aws logs tail "/aws/lambda/my-function" \100 --profile readonly --region us-east-1 \101 --follow --since 10m102103# Check what a role can do104aws iam simulate-principal-policy \105 --profile readonly \106 --policy-source-arn arn:aws:iam::123456789012:role/MyRole \107 --action-names s3:GetObject ec2:DescribeInstances108```