https://github.com/jftuga/awswho
Quickly output AWS sts get-caller-identity
https://github.com/jftuga/awswho
aws aws-sts command-line command-line-tool cross-platform go golang
Last synced: 7 months ago
JSON representation
Quickly output AWS sts get-caller-identity
- Host: GitHub
- URL: https://github.com/jftuga/awswho
- Owner: jftuga
- License: mit
- Created: 2023-11-24T16:57:43.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-24T18:03:39.000Z (almost 2 years ago)
- Last Synced: 2025-01-29T23:29:54.647Z (9 months ago)
- Topics: aws, aws-sts, command-line, command-line-tool, cross-platform, go, golang
- Language: Go
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://github.com/jftuga/awswho/releases) section.## Compilation
Static compilation can be achieved by running:
`CGO_ENABLED=0 go build -ldflags="-extldflags=-static"`
## Examples
```bash
# 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
```