-
Notifications
You must be signed in to change notification settings - Fork 14
/
serverless.yml
62 lines (55 loc) · 1.12 KB
/
serverless.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
service: serverless-medium-transcriptions
package:
exclude:
- front/**
- assets/**
- LICENSE
- README.md
- sample-article.json
custom:
serverless-offline:
port: 1337
s3:
bucket: serverless-medium-transcriptions-${opt:stage}
provider:
name: aws
runtime: nodejs6.10
environment:
TRANSCRIPTS_BUCKET: ${self:custom.s3.bucket}
iamRoleStatements:
- Effect: 'Allow'
Action:
- 's3:*'
Resource: '*'
- Effect: 'Allow'
Action:
- 'polly:SynthesizeSpeech'
Resource: '*'
functions:
transcoder:
handler: transcoder.handle
events:
- http:
path: transcode
method: post
cors: true
plugins:
- serverless-offline
resources:
Resources:
UploadBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: ${self:custom.s3.bucket}
AccessControl: PublicRead
CorsConfiguration:
CorsRules:
- AllowedMethods:
- GET
- PUT
- POST
- HEAD
AllowedOrigins:
- "*"
AllowedHeaders:
- "*"