Skip to content

Structured Errors, Standard Errors, and Off Output Format#10094

Open
AndrewAsseily wants to merge 6 commits intoaws:v2from
AndrewAsseily:str-std-output
Open

Structured Errors, Standard Errors, and Off Output Format#10094
AndrewAsseily wants to merge 6 commits intoaws:v2from
AndrewAsseily:str-std-output

Conversation

@AndrewAsseily
Copy link
Contributor

@AndrewAsseily AndrewAsseily commented Feb 19, 2026

Previously approved PRs:

Description of Changes:

1. Output Off Format

Adds --output off to suppress all stdout while preserving stderr.

Configure via output = off in ~/.aws/config or AWS_DEFAULT_OUTPUT=off.

2. Standardized Error Prefix

All CLI errors now use aws: [ERROR]: prefix for consistency.

Before: Unknown options: --invalid-option
After: aws: [ERROR]: Unknown options: --invalid-option

3. Structured Error Output

Adds --cli-error-format flag supporting enhanced (default), json, yaml, text, table, and legacy formats. Exposes additional error fields from AWS services (e.g., DynamoDB's CancellationReasons) and CLI exceptions (e.g., NoCredentialsError, NoRegionError).

Configuration:

  • Flag: --cli-error-format json
  • Config: cli_error_format = json in ~/.aws/config
  • Env: AWS_CLI_ERROR_FORMAT=json

Use legacy format to preserve old behavior without additional fields.

AndrewAsseily and others added 6 commits February 19, 2026 13:36
* Implement standardized aws: [ERROR]: format for all CLI error messages

* Add changelog entry for standardized error output
* Structured errorsL `--cli-error-format`
* Standard errors (aws: [ERROR]:)
* `off` output format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments