Last active
March 13, 2016 03:01
-
-
Save eugeneteo/874c664b768a095be8e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat iam-get-user.json | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Action": [ | |
"iam:GetUser" | |
], | |
"Effect": "Allow", | |
"Resource": "arn:aws:iam::548698731369:user/emr" | |
} | |
] | |
} | |
$ aws iam create-policy --policy-name make-emr-get-user --policy-document file://iam-get-user.json | |
{ | |
"Policy": { | |
"PolicyName": "make-emr-get-user", | |
"CreateDate": "2016-03-11T15:05:22.936Z", | |
"AttachmentCount": 0, | |
"IsAttachable": true, | |
"PolicyId": "ANPAJ3I5BYXIMET5E5UVC", | |
"DefaultVersionId": "v1", | |
"Path": "/", | |
"Arn": "arn:aws:iam::548698731369:policy/make-emr-get-user", | |
"UpdateDate": "2016-03-11T15:05:22.936Z" | |
} | |
} | |
$ aws iam attach-user-policy --user-name emr --policy-arn arn:aws:iam::548698731369:policy/make-emr-get-user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment