Announcing new output formats in AWS CLI v2
Developer Tools Blog
This article announces two new output format features for AWS CLI v2 (version 2.34.0 and later):
- Structured error output now displays additional error details previously hidden without --debug flag
- Six error format options: enhanced (default), json, yaml, text, table, and legacy
- Consistent "aws: [ERROR]:" prefix added for accessibility and automation support
- New "off" output format suppresses stdout while preserving stderr for sensitive data
- Configure error formats via --cli-error-format flag, configuration file, or AWS_CLI_ERROR_FORMAT environment variable
- Set "off" output using --output off flag, configuration file, or AWS_DEFAULT_OUTPUT environment variable
These features improve error visibility and security by allowing developers to control output formatting and suppress sensitive information in logs.
The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.
The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.