-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemplate.yml
52 lines (50 loc) · 1.15 KB
/
template.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
AWSTemplateFormatVersion: '2010-09-09'
Description: 'function to process and store SES notifications'
Transform:
- 'AWS::Serverless-2016-10-31'
Parameters:
DBHOST:
Type: String
DBUSER:
Type: String
DBPASSWORD:
Type: String
DBPORT:
Type: Number
DBDATABASE:
Type: String
Resources:
SESTopic:
Type: 'AWS::SNS::Topic'
Properties:
DisplayName: ses_topic
TopicName: ses_topic
Logger:
Type: 'AWS::Serverless::Function'
Properties:
Description: 'A Lambda function that logs the payload of messages to a database'
Runtime: nodejs12.x
Handler: function.handler
CodeUri: dist/
Environment:
Variables:
DB_HOST:
Ref: "DBHOST"
DB_USER:
Ref: "DBUSER"
DB_PASSWORD:
Ref: "DBPASSWORD"
DB_PORT:
Ref: "DBPORT"
DB_DATABASE:
Ref: "DBDATABASE"
Events:
SNSTopicEvent:
Type: SNS
Properties:
Topic:
Ref: "SESTopic"
MemorySize: 128
Timeout: 10
Policies:
- AWSLambdaBasicExecutionRole