Skip to content

Instantly share code, notes, and snippets.

@schen1628
Created May 8, 2014 19:47
Show Gist options
  • Select an option

  • Save schen1628/b8b58ab5b47b46a046cd to your computer and use it in GitHub Desktop.

Select an option

Save schen1628/b8b58ab5b47b46a046cd to your computer and use it in GitHub Desktop.
"OperatorInstanceProfile" : {
"Properties": {
"Path": "/",
"Roles": [
{
"Ref": "OperatorRole"
}
]
},
"Type": "AWS::IAM::InstanceProfile"
},
"OperatorRole": {
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": [
"sts:AssumeRole"
],
"Effect": "Allow",
"Principal": {
"Service": [
"ec2.amazonaws.com"
]
}
}
]
},
"Path": "/",
"Policies": [
{
"PolicyDocument": {
"Statement": [
{
"Action": [
"ec2:DescribeInstances",
"ec2:StartInstances",
"ec2:StopInstances"
],
"Effect": "Allow",
"Resource": "*"
}
]
},
"PolicyName": "EC2OperatorPolicy"
}
]
},
"Type": "AWS::IAM::Role"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment