-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
33 lines (31 loc) · 859 Bytes
/
serverless.yml
File metadata and controls
33 lines (31 loc) · 859 Bytes
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
service:
name: trigger-alert-test
custom:
snsTopic: filePutAlert
provider:
name: aws
runtime: nodejs8.10
memorySize: 128
timeout: 10
stage: production
region: us-east-1
environment:
snsTopic: ${self:custom.snsTopic}
iamRoleStatements:
- Effect: Allow
Action:
- kms:Decrypt
Resource: { "Fn::Join" : ["", ["arn:aws:kms:${self:provider.region}:", { "Ref" : "AWS::AccountId" }, ":key/662c685a-51e7-45a7-ad0d-478863112001" ] ] }
- Effect: Allow
Action:
- SNS:Publish
Resource: { "Fn::Join" : ["", ["arn:aws:sns:${self:provider.region}:", { "Ref" : "AWS::AccountId" }, ":${self:custom.snsTopic}" ] ] }
functions:
sendAlert:
handler: index.handler
resources:
Resources:
AlertTopic:
Type: AWS::SNS::Topic
Properties:
TopicName: ${self:custom.snsTopic}