-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
45 lines (42 loc) · 1.12 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
service: ${env:SERVICE_NAME, "chatops-webhook-proxy"}
frameworkVersion: ">=1.1.0 <2.0.0"
provider:
name: aws
runtime: nodejs8.10
region: ${opt:region, env:AWS_REGION, 'eu-west-1'}
stage: ${opt:stage, 'dev'}
environment:
SSM_PREFIX: ${env:SSM_PREFIX, "/service/chatops-webhook-proxy/default/"}
iamRoleStatements:
- Effect: "Allow"
Action:
- "ssm:GetParameters"
- "ssm:GetParametersByPath"
Resource:
- Fn::Join:
- ""
-
- "arn:aws:ssm:"
- Ref: 'AWS::Region'
- ":"
- Ref: 'AWS::AccountId'
- ":parameter${self:provider.environment.SSM_PREFIX}"
- Fn::Join:
- ""
-
- "arn:aws:ssm:"
- Ref: 'AWS::Region'
- ":"
- Ref: 'AWS::AccountId'
- ":parameter${self:provider.environment.SSM_PREFIX}*"
functions:
webhook:
handler: index.webhook
events:
- http:
path: webhook/{serviceName}
method: any
request:
parameters:
paths:
serviceName: true