-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathserverless.ts
49 lines (46 loc) · 1.01 KB
/
serverless.ts
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
import { AWS } from '@serverless/typescript'
import { settings } from './settings'
const serverlessConfiguration: AWS = {
service: 'slack-activity',
frameworkVersion: '2',
plugins: ['serverless-esbuild'],
provider: {
name: 'aws',
profile: settings.awsProfile,
region: 'ap-northeast-1',
runtime: 'nodejs12.x',
memorySize: 128,
timeout: 10,
apiGateway: {
shouldStartNameWithService: true,
minimumCompressionSize: 128,
},
environment: {
SLACK_SIGNING_SECRET: settings.slackSigningSecret,
SLACK_BOT_TOKEN: settings.slackBotToken,
SLACK_CHANNEL: settings.slackChannel,
},
lambdaHashingVersion: '20201221',
},
custom: {
esbuild: {
watch: {
pattern: ['src/**/*.ts'],
},
},
},
functions: {
app: {
handler: 'src/handler.app',
events: [
{
http: {
method: 'post',
path: 'app',
},
},
],
},
},
}
module.exports = serverlessConfiguration