-
Notifications
You must be signed in to change notification settings - Fork 7
/
serverless.yaml
49 lines (47 loc) · 1.22 KB
/
serverless.yaml
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
service: ops-bot
provider:
name: aws
region: us-east-2
memorySize: 1024
stage: dev
runtime: nodejs18.x
logRetentionInDays: 60
apiGateway:
shouldStartNameWithService: true
deploymentBucket:
name: rapidsai-serverless-deployments
environment:
NODE_ENV: production
LOG_FORMAT: json
LOG_LEVEL: debug
APP_ID: ${env:APP_ID}
WEBHOOK_SECRET: ${env:WEBHOOK_SECRET}
PRIVATE_KEY: ${env:PRIVATE_KEY}
GPUTESTER_PAT: ${env:GPUTESTER_PAT}
iam:
role:
statements:
- Effect: Allow
Action:
- "lambda:InvokeFunction"
Resource:
Fn::Sub:
- arn:aws:lambda:${aws:region}:${aws:accountId}:function:${AWS::StackName}-${fnName}
# A YAML anchor is used since `Ref` results in circular dependency issues between
# the Lambda function and this policy.
- fnName: &probotFn handleProbot
functions:
*probotFn :
handler: dist/probot.handler
timeout: 900
authorizerFn:
handler: dist/authorizer.handler
environment:
probotFnName:
Fn::Sub:
- ${AWS::StackName}-${fnName}
- fnName: *probotFn
events:
- http:
path: /
method: POST