-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
51 lines (46 loc) · 1.11 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
# Define your service name in the package.json file
service: ${file(package.json):name}
frameworkVersion: ">=1.13.2 <2.0.0"
# Optional plugins
plugins:
- serverless-python-requirements
package:
exclude:
- docs/**
- node_modules/**
- test/**
provider:
name: aws
runtime: python3.6
stage: prod
region: insert your own
deploymentBucket: serverless-slack-notifier-bot
vpc:
securityGroupIds:
- insert your own
subnetIds:
- insert your own
environment: # <- these are available in any file
SERVICE: ${self:service}
STAGE: ${opt:stage, self:provider.stage}
iamRoleStatements:
- Effect: Allow
Action:
- "execute-api:Invoke"
Resource: "arn:aws:execute-api:*:*:*"
- Effect: Allow
Action:
- lambda:InvokeFunction
Resource: "arn:aws:lambda:*:insert your own account id:function:*"
- Effect: Allow
Action:
- xray:PutTraceSegments
- xray:PutTelemetryRecords
Resource: "*"
functions:
call:
handler: handlers/lambda.lambda_handler
events:
- http:
path: call
method: any