-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
54 lines (48 loc) · 1.32 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
service: my-service-name
plugins:
- serverless-webpack
- serverless-offline
- serverless-plugin-aws-alerts
custom:
defaultStage: dev
currentStage: ${opt:stage, self:custom.defaultStage}
resourcesPrefix: ${self:service}-${self:custom.currentStage}
config: ${file(./config.${self:custom.currentStage}.json)}
webpack:
webpackConfig: 'webpack.config.js' # Name of webpack configuration file
includeModules: true # Node modules configuration for packaging
packager: 'yarn' # Packager that will be used to package your external modules
serverless-offline:
babelOptions:
presets: ["es2015"]
alerts:
stages:
- prod
topics:
alarm:
topic: ${self:service}-${opt:stage}-alerts-alarm
notifications:
- protocol: email
endpoint: [email protected] # Change this to your email address
provider:
name: aws
runtime: nodejs8.10
profile: ${opt:profile, self:custom.config.PROFILE}
region: ${opt:region, self:custom.config.REGION}
timeout: 300
environment:
REGION: ${self:custom.config.REGION}
iamRoleStatements:
- Effect: "Allow"
Action:
- "dynamodb:*"
Resource: "*"
package:
individually: true
functions:
hello:
handler: src/handler.default
events:
- http:
path: version
method: get