• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

aws history: Print the command-line history for AWS CLI commands (Command Examples)

by admin

The aws history command is a feature of the AWS Command Line Interface (CLI) that allows you to print the command-line history for AWS CLI commands. This feature provides a record of the history of AWS CLI commands you have executed, but it’s important to note that the command history feature must be enabled for this to work.

Here are the key points to understand about the aws history command:

  • Command History: When the command history feature is enabled, the AWS CLI records the commands you execute in a history file. This file stores a chronological list of the AWS CLI commands, along with their associated timestamps.
  • Printing Command History: By running the aws history command, you can retrieve and display the contents of the command history file. It presents the list of previously executed AWS CLI commands, making it easy to review your command history.
  • Filtering and Sorting: The aws history command offers options to filter and sort the command history. You can specify filters based on time intervals, specific AWS services, or command keywords to narrow down the displayed history. Sorting options allow you to organize the history by timestamp or other criteria.
  • Output Formats: The command history can be displayed in different output formats, such as table, JSON, or text. You can choose the format that best suits your needs or integrate the output with other tools or scripts.

It’s worth noting that the command history feature must be explicitly enabled for the AWS CLI to record and store command history. If the feature is not enabled, running aws history will not display any command history.

aws history Command Examples

1. List commands history with command IDs:

# aws history list

2. Display events related to a specific command given a command ID:

# aws history show command_id

Filed Under: AWS, Cloud, Linux

Some more articles you might also be interested in …

  1. How to run a cron job on specific days of the week
  2. Wallch (Wallpaper Changer) – Rotate Ubuntu Desktop Wallpapers
  3. How to enable NFS debug logging using rpcdebug
  4. qm clone Command Examples in Linux
  5. kexec Command Examples in Linux
  6. How to uninstall speedtest-cli package from Ubuntu
  7. dotnet ef: Perform design-time development tasks for Entity Framework Core
  8. gpg: command not found
  9. CentOS / RHEL 7 : How to configure kdump
  10. notify-send: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright