forked from ConsenSysMesh/lambda-nisaba
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
77 lines (73 loc) · 1.97 KB
/
serverless.yml
File metadata and controls
77 lines (73 loc) · 1.97 KB
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
service: lambda-nisaba-csi
provider:
name: aws
runtime: nodejs8.10
stage: develop
region: us-east-1
iamRoleStatements:
- Effect: Allow
Action:
- KMS:Decrypt
Resource: ${self:custom.kmsSecrets.keyArn}
environment:
SECRETS: ${self:custom.kmsSecrets.secrets.SECRETS}
# Use the serverless-webpack plugin to transpile ES6
plugins:
- serverless-webpack
- serverless-kms-secrets
# Enable auto-packing of external modules
custom:
webpackIncludeModules: true
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)}
# Implemented lambda funcionts
functions:
recaptcha:
handler: src/api_handler.recaptcha
description: Validate Recaptcha Code
events:
- http:
path: v3/recaptcha #Legacy
method: post
- http:
path: recaptcha
method: post
newDeviceKey:
handler: src/api_handler.newDeviceKey
description: Get a new fuel token by sending a signed requestToken
events:
- http:
path: newDeviceKey
method: post
phone:
handler: src/api_handler.phone_attestation
description: Get a an attestation for the verified phone on the fuelToken
events:
- http:
path: phone
method: post
start:
handler: src/api_handler.start_verification
description: Verify a phone number using Nexmo verification
events:
- http:
path: verify
method: post
next:
handler: src/api_handler.continue_verification
description: Continue with the phone verification process
events:
- http:
path: next/{devicekey}
method: get
request:
parameters:
paths:
devicekey: true
check:
handler: src/api_handler.check_verification
events:
- http:
path: check
method: post