Announcing new output formats in AWS CLI v2 | Amazon Web Services

Announcing new output formats in AWS CLI v2 | Amazon Web Services

Amazon Web Services (AWS) is announcing two new features for the AWS Command Line Interface (AWS CLI) v2: structured error output and the “off” output format.

Structured error output

Errors returned from AWS service APIs often include useful details beyond the code and message—bucket names, validation reasons, resource IDs—that were previously hidden unless you used --debug. Now, you can see this error information directly in your error output.

Starting with AWS CLI v2 version 2.34.0, any additional error details returned from service APIs will now be shown in the stderr output. Additionally, you can configure the AWS CLI to output your errors in alternative structured formats. Control how errors are displayed using the new --cli-error-format CLI flag, the cli_error_format configuration setting, or the AWS_CLI_ERROR_FORMAT environment variable.

Supported formats for the error format parameter:

https://aws.amazon.com/blogs/developer/announcing-new-output-formats-in-aws-cli-v2/