-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
41 lines (35 loc) · 909 Bytes
/
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
---
service: bitbucket2sns
plugins:
- serverless-plugin-optimize
package:
individually: true
provider:
name: aws
runtime: nodejs6.10
memorySize: 128
stage: ${opt:stage,self:custom.defaults.stage}
region: ${opt:region,self:custom.defaults.region}
profile: ${opt:profile,env:AWS_PROFILE,self:custom.defaults.profile}
environment: ${file(./${opt:env,self:custom.defaults.env}.yml)}
iamRoleStatements:
- Effect: Allow
Action:
- sns:ListTopics
- sns:CreateTopic
- sns:Publish
- sns:Subscribe
Resource:
- arn:aws:sns:${self:provider.region}:*:BITBUCKET2SNS_TOKEN
custom:
defaults:
stage: dev
region: eu-central-1
env: env
profile: default
functions:
webhook:
description: Handle incoming POST request from Bitbucket
handler: functions/handle-webhook/handler.handler
events:
- http: POST webhook