-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
57 lines (51 loc) · 1.26 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
service: web-mentions
frameworkVersion: ">=2.0.0 <4.0.0"
plugins:
- serverless-esbuild
- serverless-dynamodb-local
- serverless-offline
custom:
esbuild:
bundle: true
minify: false
sourcemap: linked
watch:
pattern: 'src/**/*.ts'
dynamodb:
stages:
- dev
start:
seed: true
port: 8000
inMemory: true
migrate: true
provider:
name: aws
runtime: nodejs14.x
profile: ${param:profile} # force the profile parameter to be required
region: ${opt:region}
stage: ${opt:stage}
environment:
STATUS_TABLE: status-table-${param:profile}-${opt:stage}
MENTION_TABLE: mention-table-${param:profile}-${opt:stage}
iam:
role:
statements:
- Effect: Allow
Action:
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DeleteItem
- dynamodb:BatchGetItem
Resource:
- !Sub ${statusTable.Arn}
- !Sub ${statusTable.Arn}/index/*
- !Sub ${mentionTable.Arn}
- !Sub ${mentionTable.Arn}/index/*
resources:
- ${file(./src/serverless-resources.yml)}
functions:
- ${file(./src/serverless-functions.yml)}