-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
69 lines (54 loc) · 1.17 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
62
63
64
65
66
67
68
69
service: scraper
app: watchlist
tenant: kimbotron
plugins:
- serverless-webpack
custom:
webpack:
webpackConfig: 'webpack.config.js'
includeModules: false
packager: npm
# ToDo: Provision DynamoDB table
#resources:
# Resources:
# Watchlist:
provider:
name: aws
runtime: nodejs8.10
stage: ${env:stage}
region: us-east-1
iamRoleStatements:
# Add Full DynamoDB permissions, but restrict to specific tables
- Effect: "Allow"
Action:
- dynamodb:*
Resource:
- "arn:aws:dynamodb:us-east-1:376336607560:table/Watchlist"
package:
individually: true
exclude:
- .env
- "*.json"
functions:
scrape:
handler: src/imdb/scrape.handler
search:
handler: src/omdb/search.handler
environment:
OMDB_API_KEY: ${env:OMDB_API_KEY}
list:
handler: src/watchlist/list.handler
environment:
TABLE_NAME: Watchlist
add:
handler: src/watchlist/add.handler
environment:
TABLE_NAME: Watchlist
detail:
handler: src/watchlist/detail.handler
environment:
TABLE_NAME: Watchlist
remove:
handler: src/watchlist/remove.handler
environment:
TABLE_NAME: Watchlist