-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
60 lines (60 loc) · 1.52 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: discord-webhook
custom:
stage: '${opt:stage, self:provider.stage}'
region: '${opt:region, self:provider.region}'
webpack:
webpackConfig: ./webpack.config.js
includeModules:
forceExclude:
- aws-sdk
- js-yaml
packager: npm
plugins:
- serverless-pseudo-parameters
- serverless-step-functions
- serverless-webpack
functions:
listen:
description: listens for BitBucket events
handler: lib/handlers/listen.handler
timeout: 2
memorySize: 512
events:
- http:
method: post
path: /bitbucket
cors: true
stepFunctions: {}
provider:
name: aws
runtime: nodejs8.10
stage: prod
region: us-west-2
environment: '${file(serverless-config/env.yml):${self:custom.stage}}'
iamRoleStatements:
- Effect: Allow
Action:
- 'xray:PutTraceSegments'
- 'xray:PutTelemetryRecords'
Resource:
- '*'
- Effect: Allow
Action:
- 'ssm:GetParameter'
- 'ssm:GetParametersByPath'
Resource:
- 'arn:aws:ssm:us-west-2*'
- Effect: Allow
Action:
- 'states:ListStateMachines'
- 'states:CreateActivity'
- 'states:StartExecution'
- 'states:ListExecutions'
- 'states:DescribeExecution'
- 'states:DescribeStateMachineForExecution'
- 'states:GetExecutionHistory'
Resource:
- 'arn:aws:states:us-west-2:7419-7656-9717:stateMachine:*'
- 'arn:aws:states:us-west-2:7419-7656-9717:execution:*:*'
package:
individually: true