-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
50 lines (46 loc) · 1.02 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
service: nearst-webhooks-tester
plugins:
- serverless-offline
provider:
name: aws
runtime: nodejs16.x
timeout: 25
region: eu-west-1
stage: production
environment:
TABLE_NAME: ${self:service}
APP_URL: !GetAtt HttpApi.ApiEndpoint
deploymentMethod: direct
lambdaHashingVersion: 20201221
iam:
role:
statements: # TODO: define IAMs per function
- Effect: Allow
Action: [ "dynamodb:*" ]
Resource: [ "*" ]
functions:
home:
handler: functions/home.handler
events:
- httpApi:
path: /
method: any
webhook:
handler: functions/webhook.handler
events:
- httpApi:
path: /webhook
method: post
resources:
Resources:
Table:
Type: AWS::DynamoDB::Table
Properties:
TableName: ${self:service}
AttributeDefinitions:
- AttributeName: id
AttributeType: S
BillingMode: PAY_PER_REQUEST
KeySchema:
- AttributeName: id
KeyType: HASH