Skip to content

Support switching the AWS region #29

@samuel-phan

Description

@samuel-phan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions