Last active
January 29, 2019 22:31
-
-
Save rambabusaravanan/1d8acc3d0dfff6ea08c5daae45ea286c to your computer and use it in GitHub Desktop.
Serverless Framework CloudFormation Templates
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
resources: | |
Resources: | |
TestOneBucket: | |
Type: AWS::S3::Bucket | |
Properties: | |
BucketName: ${self:service}-${self:provider.region}-test-one | |
CorsConfiguration: | |
CorsRules: | |
- AllowedOrigins: ['*'] | |
AllowedHeaders: ['*'] | |
AllowedMethods: [GET] | |
MaxAge: 6000 | |
LifecycleConfiguration: | |
Rules: | |
- Id: TmpTTLRule | |
AbortIncompleteMultipartUpload: | |
DaysAfterInitiation: 1 | |
ExpirationInDays: 1 | |
Prefix: /tmp | |
Status: Enabled | |
WebsiteConfiguration: | |
IndexDocument: index.html | |
ErrorDocument: index.html | |
TestOneBucketPolicy: | |
Type: AWS::S3::BucketPolicy | |
Properties: | |
Bucket: | |
Ref: "TestOneBucket" | |
PolicyDocument: | |
Statement: | |
- | |
Action: ["s3:GetObject"] | |
Effect: "Allow" | |
# Resource: { "Fn::Join" : ["", ["arn:aws:s3:::", { "Ref" : "TestOneBucket" } , "/*" ]]} | |
Resource: | |
Fn::Join: | |
- "" | |
- | |
- "arn:aws:s3:::" | |
- | |
Ref: "TestOneBucket" | |
- "/*" | |
Principal: "*" | |
# Condition: | |
# StringLike: | |
# aws:Referer: | |
# - "http://www.example.com/*" | |
# - "http://example.com/*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment