aws-cloudformation / rain

A development workflow tool for working with AWS CloudFormation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add `aws-console` logout functionality

igaskin opened this issue · comments

When switching between AWS accounts, it may be required to logout before logging into the new account.

https://signin.aws.amazon.com/oauth\?Action\=logout\&redirect_uri\=https://aws.amazon.com

The scope of this feature request is to add functionality to the aws-console command to allow for logout.

 console -h
Use your current credentials to create a sign-in URL for the AWS console and open it in a web browser.

The console command is only valid with an IAM role; not an IAM user.

Unless you specify the --name/-n flag, your AWS console user name will be derived from the role name.

Usage:
  aws-console [service]

Flags:
      --debug            Output debugging information
  -h, --help             help for aws-console
  -n, --name string      Specify a user name to use in the AWS console
  -p, --profile string   AWS profile name; read from the AWS CLI configuration file
  -r, --region string    AWS region to use
  -u, --url              Just construct the sign-in URL; don't attempt to open it
  -v, --version          version for aws-console

The issue is reproduced in Mac/Chrome.

@ericzbeard
I'm thinking of creating a new flag -l, --logout to log out the current user.
What do you think?