Skip to content

Add --multi-regions option for read-only commands - #10897

Draft
luigi617 wants to merge 1 commit into
v2from
feature/multi-region-queries
Draft

luigi617 wants to merge 1 commit into
v2from
feature/multi-region-queries

Conversation

@luigi617

@luigi617 luigi617 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Adds a --multi-regions option to supported read-only commands. It runs the operation in several regions (a comma-separated list, or all for every enabled region) and merges the responses. It labels each returned object with a _CliScope member naming its region. If any region fails, the command stops and reports the error. The option cannot be combined with --region or --endpoint-url.

The supported commands were chosen from the 1000 most frequently used commands. Commands that are not eligible were left out: those that change state, return account-wide or global data, need a resource identifier, or return responses that cannot be merged.

Example

$ aws ec2 describe-vpcs --multi-regions us-east-1,eu-west-1

{
    "Vpcs": [
        {
            "OwnerId": "239558554088",
            "InstanceTenancy": "default",
            ...
            "_CliScope": {
                "Region": "us-east-1"
            }
        },
        {
            "OwnerId": "239558554088",
            "InstanceTenancy": "default",
            ...
            "_CliScope": {
                "Region": "eu-west-1"
            }
        }
    ]
}

Testing

  • Added unit and functional tests.
  • Tested every supported command end to end.

Generated by AI tools, and reviewed by luigi liu.

This branch has not been deployed

No deployments
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