Skip to content

Instantly share code, notes, and snippets.

@ramsaylanier
Created November 28, 2017 18:21
Show Gist options
  • Select an option

  • Save ramsaylanier/247d8da0144d98810a75470d04e5b50e to your computer and use it in GitHub Desktop.

Select an option

Save ramsaylanier/247d8da0144d98810a75470d04e5b50e to your computer and use it in GitHub Desktop.
service: thumbnail-creator
custom:
bucket: <your-bucket-name-here>
provider:
name: aws
runtime: nodejs6.10
resources:
Resources:
WebAppS3Bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: ${self:custom.bucket}
AccessControl: PublicRead
WebsiteConfiguration:
IndexDocument: index.html
ErrorDocument: index.html
WebAppS3BucketPolicy:
Type: AWS::S3::BucketPolicy
Properties:
Bucket:
Ref: WebAppS3Bucket
PolicyDocument:
Statement:
- Sid: PublicReadGetObject
Effect: Allow
Principal: "*"
Action:
- s3:GetObject
Resource: arn:aws:s3:::${self:custom.bucket}/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment