Git Product home page Git Product logo

awswho's Introduction

awswho

Quickly output the results of the AWS sts get-caller-identity API

awswho does nearly the same thing as running aws sts get-caller-identity but is about 75% faster since it is written in Go. It is also portable since it can be compiled into a static, stand-alone binary executable.

Usage

Usage of awswho:
  -a	output Account as well as Arn and UserId
  -n	output a newline character
  -p string
    	an aws profile listed in ~/.aws/config (default "default")
  -r string
    	aws region (default "us-east-1")
  -v	output version and then exit

Installation

  • macOS: brew update; brew install jftuga/tap/awsho
  • Binaries for Linux, macOS and Windows are provided in the releases section.

Compilation

Static compilation can be achieved by running:

CGO_ENABLED=0 go build -ldflags="-extldflags=-static"

Examples

# no newline, by default -- good for scripting
jftuga@ubuntu:~$ awswho
123456789012jftuga@ubuntu:~$

# use a named profile with -p and region with -r
jftuga@ubuntu:~$ awswho -p prod -r us-east-2 -n
098765432123

# display all identity info with -a, plus add a newline with -n
$ jftuga@ubuntu:~$ awswho -a -n
123456789012 arn:aws:iam::123456789012:user/default AID123CCCCC12345AAAAA

awswho's People

Contributors

jftuga avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.