Created
April 30, 2021 16:09
-
-
Save cmaster11/922303b272c6f30d237566ab721b41dc to your computer and use it in GitHub Desktop.
Markdium-Track your infrastructure events with AWS SNS and Notify17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
label: SNS catch-all | |
title: | | |
{{ | |
default | |
( | |
printf | |
"SNS message - %s" | |
(last (splitList ":" .TopicArn)) | |
) | |
.Subject | |
}} | |
content: |- | |
{{ if isJson .Message }} | |
{{/* Decode the message and dump its content */}} | |
{{ dump (parseJson .Message) }} | |
{{ else }} | |
{{/* This is a normal text message */}} | |
{{ .Message }} | |
{{ if .attributesMap }} | |
{{/* If we have any attributes, let's show them */}} | |
Attributes: {{ dump .attributesMap | nindent 2 }} | |
{{ end }} | |
{{ end }} | |
testFieldType: yaml | |
testBodyYAML: |- | |
Message: Hello there! | |
MessageAttributes: | |
name: | |
Type: String | |
Value: General Kenobi | |
MessageId: 88302c8d-9d71-514c-bbb8-746c487fde28 | |
Subject: Greetings! | |
Timestamp: 2021-04-26T03:01:02.694Z | |
TopicArn: arn:aws:sns:us-east-1:123:test-sns-template | |
attributesMap: | |
name: General Kenobi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment