-
Notifications
You must be signed in to change notification settings - Fork 2
/
serverless.yml
59 lines (51 loc) · 1.1 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
service: onetable
plugins:
- serverless-esbuild
package:
patterns:
- './tables/**'
individually: false
custom:
stage: "${opt:stage, 'dev'}"
esbuild:
bundle: true
minify: false
treeShaking: true
provider:
name: aws
stage: "${self:custom.stage}"
runtime: nodejs16.x
lambdaHashingVersion: 20201221
versionFunctions: false
logRetentionInDays: 7
timeout: 45
memorySize: 1024
environment:
PROFILE: ${self:custom.stage}
LOG_FILTER: fatal, error, metrics, info, warn
LOG_OVERRIDE: ""
LOG_SAMPLE: ""
iam:
role:
statements:
- Effect: "Allow"
Action:
- "dynamodb:Query"
- "dynamodb:Scan"
- "dynamodb:GetItem"
- "dynamodb:PutItem"
- "dynamodb:UpdateItem"
- "dynamodb:DeleteItem"
- "dynamodb:DescribeTable"
Resource: "*"
functions:
invoke:
handler: Controller.handler
timeout: 500
resources:
Outputs:
OnetableController:
Export:
Name: ControllerArn
Value:
"Fn::GetAtt": [ InvokeLambdaFunction, Arn ]