Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

AWS CLI v2

$ aws Official High Risk
Amazon Web Services · Cloud & Infra · Apache-2.0 · macos / linux / windows

AWS CLI v2 exposes virtually every AWS service via unified, predictable conventions: --output json, client-side JMESPath filtering (--query), --no-cli-pager for headless shells, --profile account isolation, and --dry-run on supported EC2/IAM calls.

FCRS-1.0 Score
90 /100
Excellent
Medium Confidence
Zero-Friction Install
brew install awscli
CLI vs MCP Decision CLI Preferred vs MCP

LLMs are heavily pre-trained on aws CLI syntax; --output json + --query gives complete AWS API coverage with zero MCP schema overhead.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

Uniform --output json, built-in JMESPath --query filtering, AWS_PAGER="" / --no-cli-pager, and --generate-cli-skeleton introspection make AWS CLI remarkably predictable for agents.

  • Supports --output json, --query, --no-cli-pager, and --generate-cli-skeleton
  • v2 enables pager by default unless AWS_PAGER="" or --no-cli-pager is passed
Trust & Safety 20 / 25

IAM least-privilege roles, --profile isolation, STS short-lived tokens, and --dry-run on EC2 services are strong, though cloud blast radius and billing risk remain high if misconfigured.

  • Supports --profile, STS temporary creds, and --dry-run (EC2/selected APIs)
  • High potential billing/destructive impact under overly broad IAM permissions
Setup & Portability 13 / 15

Bundled standalone installer across macOS, Linux, and Windows, though install footprint is heavier than lightweight Go/Rust CLIs.

  • Official installers and Homebrew awscli package
Utility & Efficiency 15 / 15

Covers 300+ AWS services in a single binary; models already know its conventions deeply from pretraining.

  • Complete AWS service API coverage with --query projection
Maintenance & Lineage 10 / 10

First-party AWS tool (aws/aws-cli) updated almost daily in lockstep with AWS service launches.

  • Official aws/aws-cli repository under Apache-2.0
Docs & Verifiability 9 / 10

Exhaustive offline <service> <op> help pages and online reference.

  • Built-in aws <service> help documentation

Security, Auth & Guardrails

Auth Modes
Config File Env API Key OAuth Browser
Credential Storage

Reads profiles from ~/.aws/credentials & ~/.aws/config, AWS SSO cache, or AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_SESSION_TOKEN.

Side Effects
Read-Only Local Write Remote Write Destructive Billing Impact
Cost & Quotas

CLI is free (Apache-2.0); AWS API actions can provision costly cloud resources.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# AWS CLI Agent Rules
- ALWAYS pass `--no-cli-pager` (or set `AWS_PAGER=""`) and `--output json`.
- Run `aws sts get-caller-identity` first and pin `--profile` explicitly.
- Use `--query` on `describe-*` / `list-*` calls to avoid context overflow.
- Use ReadOnlyAccess IAM roles for investigation; never run `delete-*`, `terminate-*`, or `s3 rm --recursive` without approval.

Agent-Ready Command Recipes

Safe Read-Only Queries

Verify active IAM identity before any action
aws sts get-caller-identity --output json --no-cli-pager

Always confirms which AWS account and IAM role the agent is operating under.

Query EC2 instances with JMESPath projection
aws ec2 describe-instances --no-cli-pager --output json --query 'Reservations[].Instances[].[InstanceId,State.Name,InstanceType]'

Dramatically shrinks massive AWS JSON responses using --query.

Controlled Writes & Previews

Check IAM permissions via --dry-run
aws ec2 run-instances --dry-run --image-id ami-12345678 --instance-type t3.micro

Validates permissions and parameters without provisioning billable EC2 instances.

Strengths for Agents

  • + Consistent --output json + JMESPath --query across hundreds of AWS services.
  • + --generate-cli-skeleton lets agents inspect exact JSON input templates offline.
  • + Strong IAM / --profile / STS temporary credential boundaries.

Caveats & Pitfalls

  • ! AWS CLI v2 opens less pager by default—always set AWS_PAGER="" or pass --no-cli-pager.
  • ! --dry-run is supported on EC2 and select APIs, not universally across all AWS services.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI