-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
executable file
·53 lines (46 loc) · 1.07 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: bot-fraud-analyzer
plugins:
- serverless-offline
- serverless-python-requirements
custom:
pythonRequirements:
dockerizePip: non-linux
package:
exclude:
- './**'
- '!src/**'
useDotenv: true
provider:
name: aws
stackName: slack-bot-fraud-analyzer
runtime: python3.8
region: us-east-1
environment:
SLACK_TOKEN: ${ env:SLACK_TOKEN }
apiGateway:
shouldStartNameWithService: true
lambdaHashingVersion: 20201221
functions:
fraud-analyzer:
name: bot-fraud-analyzer
description: Analyzes user data to find possible fraud
handler: src/handler.main
memorySize: 128
timeout: 30
events:
- http:
method: POST
path: commands
resources:
Resources:
LambdaSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupName: bot-fraud-analyzer
GroupDescription: allow postgresql connetction
VpcId: vpc-4e5aa123
SecurityGroupIngress:
- IpProtocol: tcp
FromPort: 5432
ToPort: 5432
SourceSecurityGroupId: sg-c56f92aa