Resources: WebAppS3Bucket: Type: AWS::S3::Bucket Properties: BucketName: ${self:custom.prefix}-webapp-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.prefix}-webapp-bucket/*