Created
February 19, 2017 06:51
-
-
Save kuronekomichael/dce17380c6c376ffcdf3efdedaf1478b to your computer and use it in GitHub Desktop.
(社内勉強会用)EC2にフルアクセスできるんだけど、起動できるEC2インスタンスは t2.micro だけに限るというポリシー
This file contains hidden or 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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Action": "ec2:*", | |
"Effect": "Allow", | |
"Resource": "*" | |
}, | |
{ | |
"Effect": "Deny", | |
"Action": "ec2:RunInstances", | |
"Resource": [ | |
"arn:aws:ec2:*:*:instance/*" | |
], | |
"Condition": { | |
"StringNotEquals": { | |
"ec2:InstanceType": [ | |
"t2.micro" | |
] | |
} | |
} | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": "ec2:RunInstances", | |
"Resource": [ | |
"arn:aws:ec2:region::image/ami-*", | |
"arn:aws:ec2:region:account:network-interface/*", | |
"arn:aws:ec2:region:account:instance/*", | |
"arn:aws:ec2:region:account:subnet/*", | |
"arn:aws:ec2:region:account:volume/*", | |
"arn:aws:ec2:region:account:key-pair/*", | |
"arn:aws:ec2:region:account:security-group/*" | |
] | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": "elasticloadbalancing:*", | |
"Resource": "*" | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": "cloudwatch:*", | |
"Resource": "*" | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": "autoscaling:*", | |
"Resource": "*" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ポリシーAPN:
arn:aws:iam::400744529344:policy/AmazonEC2FullAccess-t2micro-only