Go SDK installed and configured.
AWS CLI Tool installed and configured or AWS environment variables exported.
Run:
export AWS_PROFILE=myuser
go run main.go
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "awesome-minimal",
"Effect": "Allow",
"Action": "iam:ListUsers",
"Resource": "*"
}
]
}
Output:
[0] Username: golang Created: 2018-01-25 05:53:58 +0000 UTC
[1] Username: jucknorris Created: 2018-01-16 19:38:32 +0000 UTC
[2] Username: terra Created: 2018-01-16 20:09:18 +0000 UTC
[3] Username: heidi Created: 2018-01-25 02:04:27 +0000 UTC
[4] Username: lola Created: 2018-01-25 02:05:21 +0000 UTC