generated from brightbock/serverless-func-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
template.yml
48 lines (48 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
---
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: &DESC Transfer Cloudwatch Alarms to Google Chat
Parameters:
ChatWebhookUrl:
Type: String
OkImageUrl:
Type: String
AlertImageUrl:
Type: String
SnsArn:
Type: String
Resources:
Function:
Type: AWS::Serverless::Function
Properties:
Handler: bootstrap
Runtime: provided.al2
Architectures:
- arm64
CodeUri: ./bootstrap.zip
FunctionName: !Join ['-', [!Ref AWS::StackName, lambda]]
Description: *DESC
Timeout: 30
MemorySize: 128
Policies:
- AWSLambdaBasicExecutionRole
Environment:
Variables:
CHAT_WEBHOOK: !Ref ChatWebhookUrl
OK_IMAGE_URL: !Ref OkImageUrl
ALERT_IMAGE_URL: !Ref AlertImageUrl
Events:
SNSEvent:
Type: SNS
Properties:
Topic: !Ref SnsArn
SqsSubscription: False
LogGroup:
Type: AWS::Logs::LogGroup
Properties:
LogGroupName: !Join ['', [/aws/lambda/, !Ref Function]]
RetentionInDays: '7'
Outputs:
Arn:
Description: Function
Value: !Ref Function