Created
September 12, 2020 05:21
-
-
Save sashaProdan/783778bc776c71dff73cbbdb375222d7 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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "The AWS CloudFormation template for this Serverless application", | |
"Resources": { | |
"ServerlessDeploymentBucket": { | |
"Type": "AWS::S3::Bucket", | |
"Properties": { | |
"BucketEncryption": { | |
"ServerSideEncryptionConfiguration": [ | |
{ | |
"ServerSideEncryptionByDefault": { | |
"SSEAlgorithm": "AES256" | |
} | |
} | |
] | |
} | |
} | |
}, | |
"ServerlessDeploymentBucketPolicy": { | |
"Type": "AWS::S3::BucketPolicy", | |
"Properties": { | |
"Bucket": { | |
"Ref": "ServerlessDeploymentBucket" | |
}, | |
"PolicyDocument": { | |
"Statement": [ | |
{ | |
"Action": "s3:*", | |
"Effect": "Deny", | |
"Principal": "*", | |
"Resource": [ | |
{ | |
"Fn::Join": [ | |
"", | |
[ | |
"arn:", | |
{ | |
"Ref": "AWS::Partition" | |
}, | |
":s3:::", | |
{ | |
"Ref": "ServerlessDeploymentBucket" | |
}, | |
"/*" | |
] | |
] | |
} | |
], | |
"Condition": { | |
"Bool": { | |
"aws:SecureTransport": false | |
} | |
} | |
} | |
] | |
} | |
} | |
} | |
}, | |
"Outputs": { | |
"ServerlessDeploymentBucketName": { | |
"Value": { | |
"Ref": "ServerlessDeploymentBucket" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment