From 67483da61a028a5ae98b02e9c35c9711587b6a28 Mon Sep 17 00:00:00 2001 From: Jeff Bacon <44843779+thesuavehog@users.noreply.github.com> Date: Wed, 13 Dec 2023 18:56:24 +0000 Subject: [PATCH] fix Print out the name of the SNS topic that a Notification is published to for clarity in the logs #183 --- source/LambdaLayers/sechub_findings.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/LambdaLayers/sechub_findings.py b/source/LambdaLayers/sechub_findings.py index 629753dc..69b338d4 100644 --- a/source/LambdaLayers/sechub_findings.py +++ b/source/LambdaLayers/sechub_findings.py @@ -271,9 +271,10 @@ def notify(self): 'finding': self.finding_info } + topic = 'SO0111-SHARR_Topic' if self.send_to_sns: sent_id = publish_to_sns( - 'SO0111-SHARR_Topic', + topic, json.dumps( sns_notify_json, indent=2, @@ -281,7 +282,7 @@ def notify(self): ), self.__region ) - print(f'Notification message ID {sent_id} sent.') + print(f'Notification message ID {sent_id} sent to {topic}') self.applogger.add_message( self.severity + ': ' + self.message )