-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathserverless.yml
55 lines (50 loc) · 1.18 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
service: aws-nestjs-starter
provider:
name: aws
runtime: nodejs16.x
stage: ${opt:stage, 'dev'}
region: ${opt:region, 'us-east-1'}
environment:
SERVICE: ${self:service}
STAGE: ${self:provider.stage}
REGION: ${self:provider.region}
NO_COLOR: ${env:NO_COLOR, 'true'}
IS_DDB_LOCAL: ${env:IS_DDB_LOCAL, 'false'}
apiGateway:
shouldStartNameWithService: true
iam:
role:
statements:
- Effect: Allow
Action:
- dynamodb:DescribeTable
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DeleteItem
Resource: arn:aws:dynamodb:${self:provider.region}:*:*
plugins:
- serverless-plugin-typescript
- serverless-dynamodb-local
- serverless-offline
custom:
dynamodb:
stages:
- ${self:provider.stage}
start:
port: 8000
inMemory: true
migrate: true
seed: false
functions:
index-function:
handler: src/index.handler
events:
- http:
cors: true
path: '{proxy+}'
method: any
resources:
- ${file(resource/dynamodb.yml)}