Skip to content

biatunky/awslogin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

awslogin

Description

Using AssumeRole, accept IAMRole and log in to the AWS management console.

Usage

  • Print Help.
$ awslogin -h
Usage:
  -l    Print available ARN list and quit. (Short)
  -list
    	Print available ARN list and quit.
  -r string
    	Use IAM-Role. (Short)
  -rolename string
    	Use IAM-Role.
  -v    Print version information and quit. (Short)
  -version
    	Print version information and quit.
  • Print Arns.
$ awslogin -l
test
  • Login AWS management console.
$ awslogin -r test
(open browser)

  • Recommended usage.

Used with peco.
First install peco.
Next install awslogin.
Write to your ~/.zshrc file.

function al-src () {
    local selected_arn=$(awslogin -l | peco --query "$LBUFFER")
    BUFFER="awslogin -r ${selected_arn}"
    zle accept-line
    zle clear-screen
}
zle -N al-src
bindkey '+_' al-src

Press '+_', you can select arn.

Install

$ curl -sLO `curl -s 'http://grl.i-o.sh/youyo/awslogin?suffix=darwin_amd64.zip'`
$ unzip awslogin_darwin_amd64.zip

Contribution

  1. Fork (https://github.com/youyo/awslogin/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Run test suite with the go test ./... command and confirm that it passes
  6. Run gofmt -s
  7. Create a new Pull Request

Author

youyo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Go 88.7%
  • Makefile 11.3%