This repository has been archived by the owner on May 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathserverless.yml
79 lines (72 loc) · 1.86 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
70
71
72
73
74
75
76
77
78
79
service: lambda-sensui
plugins:
- serverless-offline
- serverless-kms-secrets
- serverless-domain-manager
- serverless-plugin-aws-alerts
provider:
name: aws
runtime: nodejs8.10
stage: develop
region: us-west-2
iamRoleStatements:
- Effect: Allow
Action:
- KMS:Decrypt
Resource: ${self:custom.kmsSecrets.keyArn}
environment:
SECRETS: ${self:custom.kmsSecrets.secrets.SECRETS}
custom:
serverless-kms-secrets:
secretsFile: kms-secrets.${opt:stage, self:provider.stage}.${opt:region, self:provider.region}.yml
kmsSecrets: ${file(kms-secrets.${opt:stage, self:provider.stage}.${opt:region, self:provider.region}.yml)}
domainName:
develop: api.uport.space
master: api.uport.me
customDomain:
domainName: ${self:custom.domainName.${opt:stage, self:provider.stage}}
basePath: sensui
createRoute53Record: false
alerts:
dashboards: true
topics:
alarm: arn:aws:sns:us-west-2:113196216558:cloudwatch-alarm-to-slack
alarms:
- functionThrottles
- functionErrors
- functionInvocations
- functionDuration
definitions:
functionDuration:
threshold: 1000
functions:
rpc:
description: RPC handler
handler: src/api_handler.rpc
timeout: 30
events:
- http:
path: rpc/{networkId}/{authToken}
method: post
new_block:
description: New Block handler
handler: src/api_handler.new_block
timeout: 30
events:
- http:
path: new_block/{networkId}
method: get
fund:
description: Fund handler
handler: src/api_handler.fund
timeout: 30
events:
- http:
path: fund/{networkId}/{authToken}
method: post
check_pendings:
handler: src/jobs_handler.check_pendings
events:
- schedule:
rate: rate(5 minutes)
enabled: true