-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
67 lines (60 loc) · 1.45 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
service: disposable-email-bot
plugins:
- serverless-prune-plugin
- serverless-dynamodb-local
- serverless-offline
- serverless-iam-roles-per-function
- serverless-pseudo-parameters
- serverless-plugin-lambda-dead-letter
custom:
prune:
automatic: true
number: 3
cors:
staging: false
production: false
default: true
domainName: "happyeme.com"
accountId: !Ref AWS::AccountId
provider:
name: aws
runtime: nodejs12.x
stage: dev
accountId: 716354888588
region: ${opt:region}
tags:
Service: ${self:service}
Owner: binli
Environment: ${env:ENVIRONMENT}
Region: ${self:provider.region}
Version: ${env:SERVICE_VERSION}
stackTags:
Service: ${self:service}
Owner: binli
Environment: ${env:ENVIRONMENT}
Region: ${self:provider.region}
Version: ${env:SERVICE_VERSION}
functions:
echoBot:
handler: src/handler/botMessage.handler
environment:
MicrosoftAppId: ${file(./src/service/config.js):fetchAppId}
MicrosoftAppPassword: ${file(./src/service/config.js):fetchAppPassword}
timeout: 300
memorySize: 256
iamRoleStatementsInherit: true
iamRoleStatements:
- Effect: Allow
Action:
- "iam:CreatePolicyVersion"
- "iam:DeletePolicyVersion"
Resource: "*"
events:
- http:
path: /
method: ANY
cors: true
- http:
path: /{any+}
method: ANY
cors: true