Skip to content

jpukg/aws-go-iam-list-users

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS GO SDK

go-awesome

List all IAM Users

Requirements

Go SDK installed and configured.
AWS CLI Tool installed and configured or AWS environment variables exported.

Usage

Run:

export AWS_PROFILE=myuser

go run main.go

Minimal IAM Policy

{
    "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

Links

go-awesome

About

😇 aws go lang sdk - list all iam users

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%