awsd icon indicating copy to clipboard operation
awsd copied to clipboard

Support switching the AWS region

Open samuel-phan opened this issue 1 year ago • 0 comments

Description

Support switching the AWS region.

To change the AWS region, I would run:

awsd set region us-east-1

The env vars $AWS_REGION and $AWS_DEFAULT_REGION (legacy) would be set to us-east-1.

awsd set region must support completion, i.e. if I type awsd set region us<Tab>, it should offer me us-east-1, us-west-1, etc.

We could also have a subcommand:

awsd list regions

To be consistent, we should refactor awsd list to awsd list profiles.

We could also add the set profile subcommand:

awsd set profile foo  # same as "awsd foo", but this is in case someone decided to name an AWS profile "list", "set", etc. though we agree that this is a bad idea :)

awsd set profile must support completion, just like awsd <Tab>.

New subcommands tree

aws
  - completion
  - help
  - list
    - profiles
    - regions
  - set
    - profile
    - region
  - version

Inspired by: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/aws

samuel-phan avatar Nov 20 '24 15:11 samuel-phan