Print the command-line history for AWS CLI commands (the record of history of AWS CLI commands must be enabled). More information: https://docs.aws.amazon.com/cli/latest/reference/history/.
aws history list
aws history show command_id