cloudformation-helpers/test/aws/s3.putBucketPolicy.template
benoit74 181bc2d10f Add support for S3.putBucketPolicy (#3)
* Add support for S3.putBucketPolicy

* Add support to s3.putBucketPolicy (documentation)

* More coherent test case
2016-07-15 14:06:19 -04:00

38 lines
1.3 KiB
Text

{
"AWSTemplateFormatVersion": "2010-09-09",
"Parameters": {
"CFHelperStackName": {
"Type": "String",
"Description": "The name of the stack where you installed the CloudFormation helper functions. See https://github.com/gilt/cloudformation-helpers."
}
},
"Resources": {
"CFHelperStack": {
"Type": "AWS::CloudFormation::Stack",
"Properties": {
"TemplateURL": "https://s3.amazonaws.com/com.gilt.public.backoffice/cloudformation_templates/lookup_stack_outputs.template"
}
},
"CFHelper": {
"Type": "Custom::CFHelper",
"Properties": {
"ServiceToken": { "Fn::GetAtt" : ["CFHelperStack", "Outputs.LookupStackOutputsArn"] },
"StackName": { "Ref": "CFHelperStackName" }
},
"DependsOn": [
"CFHelperStack"
]
},
"S3PutBucketPolicy": {
"Type": "Custom::S3PutBucketPolicy",
"Properties": {
"ServiceToken": { "Fn::GetAtt" : ["CFHelper", "S3PutBucketPolicyFunctionArn"] },
"Bucket": "my-test-bucket321",
"Policy": "{ \"Version\": \"2008-10-17\", \"Statement\": [ { \"Effect\": \"Allow\", \"Principal\": { \"Service\": \"ses.amazonaws.com\" }, \"Action\": \"s3:PutObject\", \"Resource\": \"arn:aws:s3:::my-test-bucket321/*\" } ] }"
},
"DependsOn": [
"CFHelper"
]
}
}
}