-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
68 lines (66 loc) · 1.5 KB
/
serverless.yml
File metadata and controls
68 lines (66 loc) · 1.5 KB
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
62
63
64
65
66
67
68
service: recipe-runner
provider:
name: aws
runtime: nodejs12.x
stage: prod
region: eu-west-2
usagePlan:
quota:
limit: 10000
period: MONTH
throttle:
burstLimit: 200
rateLimit: 100
iamRoleStatements:
- Effect: Allow
Action:
- s3:PutObject
Resource: 'arn:aws:s3:::recipe-runner-uploads/*'
environment:
DB_HOSTNAME: ${ssm:/db_hostname~true}
DB_USERNAME: ${ssm:/db_username~true}
DB_PASSWORD: ${ssm:/db_password~true}
DB_DATABASE: recipe-runner
functions:
fetch-recipe:
handler: src/functions/fetch-recipe.handler
events:
- http:
path: recipes/{recipeId}
method: get
cors: true
fetch-recipes:
handler: src/functions/fetch-recipes.handler
events:
- http:
path: recipes
method: get
cors: true
get-upload-url:
handler: src/functions/get-upload-url.handler
events:
- http:
path: upload-url
method: get
cors: true
create-recipe:
handler: src/functions/create-recipe.handler
events:
- http:
path: recipes
method: post
cors: true
update-recipe:
handler: src/functions/update-recipe.handler
events:
- http:
path: recipes/{recipeId}
method: post
cors: true
delete-recipe:
handler: src/functions/delete-recipe.handler
events:
- http:
path: recipes/{recipeId}
method: delete
cors: true