Skip to content

Instantly share code, notes, and snippets.

@ThisIsMissEm
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThisIsMissEm/8921375 to your computer and use it in GitHub Desktop.
Save ThisIsMissEm/8921375 to your computer and use it in GitHub Desktop.
Are these two Resource definitions for Cloudformation the same?
"WordPressAppAndDbServerRole": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": [
"ec2.amazonaws.com"
]
},
"Action": [
"sts:AssumeRole"
]
}
]
},
"Path": "/",
"Policies": [{
"PolicyName": "S3Write",
"PolicyDocument": {
"Statement": [
{
"Action": [
"s3:ListBucket",
"s3:PutObject"
],
"Effect": "Allow",
"Resource": "*"
}
]
},
"Roles": [
{ "Ref": "WordPressAppAndDbServerRole" }
]
}]
}
},
"WordPressAppAndDbServerRole": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": [
"ec2.amazonaws.com"
]
},
"Action": [
"sts:AssumeRole"
]
}
]
},
"Path": "/"
}
},
"WordPressAppAndDbServerRolePolicies": {
"Type": "AWS::IAM::Policy",
"Properties": {
"PolicyName": "S3Write",
"PolicyDocument": {
"Statement": [
{
"Action": [
"s3:ListBucket",
"s3:PutObject"
],
"Effect": "Allow",
"Resource": "*"
}
]
},
"Roles": [
{ "Ref": "WordPressAppAndDbServerRole" }
]
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment