awscli
Skill2 starsChanged 8 months agoMITView on GitHub
Manage AWS services using the AWS CLI (aws command). Use when the user wants to interact with AWS services from the command line, including S3, EC2, IAM, Lambda, CloudFormation, ECS, SSM, Secrets Manager, DynamoDB, SQS, CloudWatch Logs, and more. Triggers on mentions of AWS, aws cli, S3, EC2, Lambda, or any AWS service management.
- Reads credentials
- Installs packages
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- 1password-cliSkill
- gandi-cliSkill
- iterm2-automationSkill
- iterm2-profilesSkill
- iterm2-shell-setupSkill
- pbcopySkill
- syncthingSkill
- synology-cliSkill
- tailscale-cliSkill
- textual-tuiSkill
- your-skill-nameSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 124
Use --filters first to reduce data, then --query for formatting:
- Distinctive: line 258
Use waiters: instead of polling in scripts
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AWS CLI Assistant
Help users manage AWS services using the aws CLI (v2).
Prerequisites
- AWS CLI v2 installed (
brew install awsclion macOS, or see reference/commands.md) - Credentials configured via
aws configure, environment variables, SSO, or IAM role - Verify setup:
aws sts get-caller-identity
Command Structure
aws <service> <command> [subcommand] [options]Configuration
Files
~/.aws/credentials— access keys (profile names withoutprofileprefix)~/.aws/config— region, output, SSO settings (named profiles use[profile name])
# ~/.aws/credentials
[default]
aws_access_key_id=AKIAIOSFODNN7EXAMPLE
aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
# ~/.aws/config
[default]
region=us-west-2
output=json
[profile staging]
region=us-east-1
output=tableKey Environment Variables
| Variable | Purpose |
AWS_ACCESS_KEY_ID | Access key |
AWS_SECRET_ACCESS_KEY | Secret key |
AWS_SESSION_TOKEN | Temporary session token |
AWS_DEFAULT_REGION / AWS_REGION | Default region |
AWS_PROFILE | Named profile to use |
AWS_PAGER | Pager program (set "" to disable) |
Profiles
aws s3 ls --profile staging # Use specific profile
export AWS_PROFILE=staging # Set for session
aws configure list-profiles # List all profiles
aws configure list # Show active config with sourcesCredential Precedence
- CLI options → 2. Environment variables → 3. SSO → 4.
~/.aws/credentials→ 5.~/.aws/config→ 6. Container/EC2 instance role
SSO (Recommended for Human Users)
[profile dev]
sso_session = my-sso
sso_account_id = 111122223333
sso_role_name = SampleRole
region = us-west-2
[sso-session my-sso]
sso_region = us-east-1
sso_start_url = https://my-sso-portal.awsapps.com/start
sso_registration_scopes = sso:account:accessaws sso login --profile devOutput & Filtering
Output Formats
--output json|yaml|text|table (default: json)
JMESPath Filtering (--query)
# Get specific fields as table
aws ec2 describe-instances \
--query 'Reservations[*].Instances[*].{ID:InstanceId,Type:InstanceType,State:State.Name}' \
--output table
# Filter by condition
aws ec2 describe-volumes --query 'Volumes[?Size > `50`].{ID:VolumeId,Size:Size}'
# Get single value as text
aws ec2 describe-instances --query 'Reservations[0].Instances[0].InstanceId' --output text
# Sort and limit
aws ec2 describe-images --owners self \
--query 'reverse(sort_by(Images,&CreationDate))[:5].{ID:ImageId,Date:CreationDate}'Server-Side Filtering
Use --filters first to reduce data, then --query for formatting:
aws ec2 describe-instances \
--filters "Name=instance-state-name,Values=running" "Name=tag:Env,Values=prod" \
--query 'Reservations[*].Instances[*].[InstanceId,InstanceType]' --output textPagination
--no-paginate # First page only
--page-size 100 # Items per API call (reduces timeouts)
--max-items 50 # Total items limit
--starting-token <token> # Resume from NextToken
--no-cli-pager # Disable pager for this commandParameter Input
# From file (text)
aws ec2 run-instances --cli-input-json file://params.json
# From file (binary)
aws lambda update-function-code --zip-file fileb://function.zip
# Generate skeleton
aws ec2 run-instances --generate-cli-skeleton input > params.json
# Shorthand syntax
aws ec2 create-tags --resources i-123 --tags Key=Name,Value=MyServer Key=Env,Value=prodCommon Patterns
S3
aws s3 ls # List buckets
aws s3 ls s3://bucket --recursive --human-readable --summarize
aws s3 cp file.txt s3://bucket/ # Upload
aws s3 cp s3://bucket/file.txt ./ # Download
aws s3 sync ./dir s3://bucket/dir --delete # Sync with delete
aws s3 presign s3://bucket/file --expires-in 300 # Presigned URL
aws s3 rm s3://bucket/ --recursive # Delete all objectsEC2
aws ec2 describe-instances --filters "Name=instance-state-name,Values=running"
aws ec2 run-instances --image-id ami-xxx --instance-type t3.micro --key-name mykey
aws ec2 stop-instances --instance-ids i-xxx
aws ec2 start-instances --instance-ids i-xxx
aws ec2 terminate-instances --instance-ids i-xxxIAM & STS
aws sts get-caller-identity # Who am I?
aws iam list-users
aws iam create-role --role-name MyRole --assume-role-policy-document file://trust.json
aws iam attach-role-policy --role-name MyRole --policy-arn arn:aws:iam::aws:policy/...
aws sts assume-role --role-arn arn:aws:iam::123456789012:role/MyRole --role-session-name sess1Lambda
aws lambda invoke --function-name my-func --payload '{"key":"val"}' out.json
aws lambda update-function-code --function-name my-func --zip-file fileb://code.zip
aws lambda list-functionsCloudWatch Logs
aws logs tail /aws/lambda/my-func --follow --since 5m
aws logs filter-log-events --log-group-name /aws/lambda/my-func --filter-pattern "ERROR"SSM Parameter Store & Secrets Manager
aws ssm get-parameter --name /app/config/key --with-decryption
aws ssm put-parameter --name /app/config/key --type SecureString --value "secret"
aws ssm get-parameters-by-path --path /app/ --recursive --with-decryption
aws secretsmanager get-secret-value --secret-id MySecret
aws secretsmanager create-secret --name MySecret --secret-string file://creds.jsonWaiters
Block until a resource reaches a desired state:
aws ec2 wait instance-running --instance-ids i-xxx
aws cloudformation wait stack-create-complete --stack-name my-stackGlobal Options
| Option | Description |
--region | AWS region |
--profile | Named profile |
--output | Output format |
--query | JMESPath filter |
--no-cli-pager | Disable pager |
--no-paginate | First page only |
--debug | Debug logging to stderr |
--dry-run | Validate without executing (EC2, etc.) |
--no-sign-request | Skip signing (public resources) |
--endpoint-url | Custom endpoint (LocalStack, etc.) |
Return Codes
| Code | Meaning |
| 0 | Success |
| 252 | Invalid syntax or parameter |
| 253 | Invalid credentials/config |
| 254 | Service returned an error |
| 255 | General failure |
Best Practices
- Use SSO or IAM roles — avoid long-term access keys
- Use
--query+--output textfor scriptable output - Combine server-side
--filterswith client-side--queryfor efficiency - Use
file://for JSON params — avoids shell quoting issues and keeps secrets out of process lists - Use
--generate-cli-skeletonto discover parameter structure - Use waiters instead of polling in scripts
- Set
AWS_PAGER=""in scripts to prevent pager blocking
For complete service command reference, see reference/commands.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

