forked from prandogabriel/tech-talk-aws-step-functions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.ts
63 lines (58 loc) · 1.36 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import type { AWS } from "@serverless/typescript";
import resources from "./resources";
const service = "tech-talk-aws-step-functions";
const configuration: AWS = {
service,
variablesResolutionMode: "20210326",
frameworkVersion: "2",
functions: {
findUserData: {
handler: "src/handler.findUserData"
},
findUserTransactions: {
handler: "src/handler.findUserTransactions"
},
generateUserReport: {
handler: "src/handler.generateUserReport"
},
sendMailReport: {
handler: "src/handler.sendMailReport"
}
},
resources,
provider: {
name: "aws",
runtime: "nodejs14.x",
lambdaHashingVersion: "20201221",
stage: "dev",
profile: "dev",
region: "us-east-1",
versionFunctions: false,
timeout: 40,
apiName: service,
tracing: {
apiGateway: true,
lambda: true
},
iam: {
role: {
name: `${service}-lambda-role`,
statements: []
}
}
},
custom: {
cfStacks: {},
stage: "${opt:stage,'dev'}",
webpack: {
webpackConfig: "./webpack.config.js",
includeModules: true,
packager: "yarn",
packagerOptions: {
scripts: ["yarn autoclean --init", "yarn autoclean --force"]
}
}
},
plugins: ["serverless-webpack", "serverless-offline", "serverless-step-functions"]
};
module.exports = configuration;