← 返回命令列表

Linux command

aws-history 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

List recent CLI command history

aws history list

Show detailed information

aws history show [command-id]

Enable CLI history

echo "[default]\ncli_history = enabled" >> ~/.aws/config

说明

aws history provides access to the history of AWS CLI commands executed over time. It allows reviewing past commands, their arguments, API calls made, and responses received for debugging and auditing purposes. History recording must be enabled by setting cli_history = enabled in the ~/.aws/config file. Once enabled, the CLI records all command invocations for later inspection.

参数

--debug
Enable debug logging
--output
Output format (json, text, table)
--query
JMESPath query to filter results
--profile
Use a specific named profile

FAQ

What is the aws-history command used for?

aws history provides access to the history of AWS CLI commands executed over time. It allows reviewing past commands, their arguments, API calls made, and responses received for debugging and auditing purposes. History recording must be enabled by setting cli_history = enabled in the ~/.aws/config file. Once enabled, the CLI records all command invocations for later inspection.

How do I run a basic aws-history example?

Run `aws history list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --debug do in aws-history?

Enable debug logging