Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation on how to setup AWS IAM #12

Open
laroo opened this issue Oct 24, 2016 · 0 comments
Open

Add documentation on how to setup AWS IAM #12

laroo opened this issue Oct 24, 2016 · 0 comments

Comments

@laroo
Copy link

laroo commented Oct 24, 2016

It took me some time to find out on how to setup AWS IAM user/role/policy. Maybe it's helpful for other users on how to get started.

I created a user keymaker and create a policy to limit only listing users/groups and ssh keys:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "AllowKeymakerToListAccounts",
            "Effect": "Allow",
            "Action": [
                "iam:ListAccountAliases",
                "iam:ListUsers",
                "iam:ListGroups",
                "iam:ListGroupsForUser",
                "iam:GetUser",
                "iam:GetGroup",
                "iam:ListSSHPublicKeys",
                "iam:GetSSHPublicKey"
            ],
            "Resource": "*"
        }
    ]
}

To have the user automatically added to IAM groups the group name must be prepended with keymaker_ AND must have the path /keymaker/. However it is not possible to create a group from Amazon AWS console and define the path, you must use CLI:

$ aws iam create-group --path "/keymaker/" --group-name keymaker_mylinuxgroup

Notes:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant