AWS Infra
Overview
Use the local AWS CLI to answer questions about AWS resources. Default to read‑only queries. Only propose or run write/destructive actions after explicit user confirmation.
Quick Start
- 1. Determine profile/region from environment or
~/.aws/config. - Start with identity:
-
aws sts get-caller-identity
- 3. Use read‑only service commands to answer the question.
- If the user asks for changes, outline the exact command and ask for confirmation before running.
Safety Rules (must follow)
- - Treat all actions as read‑only unless the user explicitly requests a change and confirms it.
- For any potentially destructive change (delete/terminate/destroy/modify/scale/billing/IAM credentials), require a confirmation step.
- Prefer
--dry-run when available and show the plan before execution. - Never reveal or log secrets (access keys, session tokens).
Task Guide (common requests)
- - Inventory / list: use
list/describe/get commands. - Health / errors: use CloudWatch metrics/logs queries.
- Security checks: IAM, S3 public access, SG exposure, KMS key usage.
- Costs: Cost Explorer / billing queries (read‑only).
- Changes: show exact CLI command and require confirmation.
Region & Profile Handling
- - If the user specifies a region/profile, honor it.
- Otherwise use
AWS_PROFILE / AWS_REGION if set, then fall back to ~/.aws/config. - When results are region‑scoped, state the region used.
References
See
references/aws-cli-queries.md for common command patterns.
Assets
- -
assets/icon.svg — custom icon (dark cloud + terminal prompt)
AWS 基础设施
概述
使用本地 AWS CLI 回答有关 AWS 资源的问题。默认执行只读查询。仅在获得用户明确确认后,才提议或执行写入/破坏性操作。
快速入门
- 1. 从环境变量或 ~/.aws/config 确定配置文件/区域。
- 从身份验证开始:
- aws sts get-caller-identity
- 3. 使用只读服务命令回答问题。
- 如果用户要求更改,先概述具体命令,并在执行前请求确认。
安全规则(必须遵守)
- - 除非用户明确请求更改 且 确认,否则将所有操作视为只读。
- 对于任何潜在的破坏性更改(删除/终止/销毁/修改/扩展/计费/IAM 凭证),需要确认步骤。
- 尽可能使用 --dry-run,并在执行前展示计划。
- 绝不泄露或记录密钥(访问密钥、会话令牌)。
任务指南(常见请求)
- - 清单/列表:使用 list/describe/get 命令。
- 健康/错误:使用 CloudWatch 指标/日志查询。
- 安全检查:IAM、S3 公共访问、安全组暴露、KMS 密钥使用情况。
- 成本:Cost Explorer / 计费查询(只读)。
- 更改:展示精确的 CLI 命令并要求确认。
区域与配置文件处理
- - 如果用户指定了区域/配置文件,则遵循该设置。
- 否则,优先使用 AWSPROFILE / AWSREGION(若已设置),然后回退到 ~/.aws/config。
- 当结果按区域划分时,需注明所使用的区域。
参考
常见命令模式请参见 references/aws-cli-queries.md。
资源
- - assets/icon.svg — 自定义图标(深色云朵 + 终端提示符)