-
Notifications
You must be signed in to change notification settings - Fork 5
/
serverless.yml
60 lines (57 loc) · 1.37 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
service: serverless-sample
provider:
name: aws
runtime: nodejs6.10
stage: dev
region: 'ap-south-1'
memorySize: 128
timeout: 10
cfLogs: true
deploymentBucket:
serverSideEncryption: AES256
stackTags:
environment: dev
serviceName: serverless-sample
environment:
cacheUrl: ${cf:serverless-sample-dev.cacheUrl}
iamRoleStatements:
- Effect: 'Allow'
Action:
- "logs:CreateLogGroup"
- "logs:CreateLogStream"
- "logs:PutLogEvents"
- "ec2:CreateNetworkInterface"
- "ec2:DeleteNetworkInterface"
- "ec2:DescribeNetworkInterfaces"
Resource: '*'
vpc:
securityGroupIds:
- ${cf:serverless-sample-dev.VPCSecurityGroup}
- ${cf:serverless-sample-dev.RedisSecurityGroup}
subnetIds:
- ${cf:serverless-sample-dev.PrivateSubnetA}
- ${cf:serverless-sample-dev.PublicSubnetB}
package:
exclude:
- ./node_modules/**
- ./test/**
- ./.eslintrc.json
plugins:
- serverless-webpack
- serverless-offline
custom:
webpackIncludeModules: true
functions:
getProductData:
handler: handler.getProductData
events:
- http:
path: product/data/{id}
method: GET
saveProductData:
handler: handler.saveProductData
events:
- http:
path: product/save
method: POST
resources: ${file(./cf-resource.json)}