-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy paths-function.json
More file actions
96 lines (96 loc) · 2.45 KB
/
Copy paths-function.json
File metadata and controls
96 lines (96 loc) · 2.45 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{
"name": "webhook",
"runtime": "nodejs4.3",
"description": "Serverless Lambda function for project: messenger-bot-serverless",
"customName": false,
"customRole": false,
"handler": "handler.handler",
"timeout": 6,
"memorySize": 128,
"authorizer": {},
"custom": {
"excludePatterns": [],
"webpack": {
"configPath": "webpack.config.js"
}
},
"endpoints": [
{
"path": "webhook",
"method": "GET",
"type": "AWS",
"authorizationType": "none",
"authorizerFunction": false,
"apiKeyRequired": false,
"requestParameters": {},
"requestTemplates": {
"application/json": {
"hubChallenge": "$input.params('hub.challenge')",
"hubMode": "$input.params('hub.mode')",
"hubVerifyToken": "$input.params('hub.verify_token')",
"httpMethod": "$context.httpMethod"
}
},
"responses": {
"400": {
"statusCode": "400"
},
"default": {
"statusCode": "200",
"responseParameters": {},
"responseModels": {
"application/json;charset=UTF-8": "Empty"
},
"responseTemplates": {
"application/json;charset=UTF-8": ""
}
}
}
},
{
"path": "webhook",
"method": "POST",
"type": "AWS",
"authorizationType": "none",
"authorizerFunction": false,
"apiKeyRequired": false,
"requestParameters": {},
"requestTemplates": {
"application/json": {
"payload": "$input.json(\"$\")",
"signature": "$input.params().header.get('X-Hub-Signature')",
"httpMethod": "$context.httpMethod"
}
},
"responses": {
"400": {
"statusCode": "400"
},
"default": {
"statusCode": "200",
"responseParameters": {},
"responseModels": {
"application/json;charset=UTF-8": "Empty"
},
"responseTemplates": {
"application/json;charset=UTF-8": ""
}
}
}
}
],
"events": [],
"environment": {
"SERVERLESS_PROJECT": "${project}",
"SERVERLESS_STAGE": "${stage}",
"SERVERLESS_REGION": "${region}",
"VERIFY_TOKEN": "${VERIFY_TOKEN}",
"PAGE_ACCESS_TOKEN": "${PAGE_ACCESS_TOKEN}",
"LOG_WEBHOOK_MESSAGES": "${LOG_WEBHOOK_MESSAGES}",
"APP_SECRET": "${APP_SECRET}"
},
"vpc": {
"securityGroupIds": [],
"subnetIds": []
}
}