diff --git a/lambdas/cloudwatch-slack-alerts/function.py b/lambdas/cloudwatch-slack-alerts/function.py index 32bc28e..37ef52f 100644 --- a/lambdas/cloudwatch-slack-alerts/function.py +++ b/lambdas/cloudwatch-slack-alerts/function.py @@ -17,8 +17,8 @@ def lambda_handler(event, context): try: message = json.loads(event['Records'][0]['Sns']['Message']) except ValueError as e: - message = '{"message": "%s"}' (event['Records'][0]['Sns']['Message'].replace('"', '\\"')) - return True + message = { "message": event['Records'][0]['Sns']['Message'] } + logger.info("Message: " + str(message)) if "AlarmName" in message.keys():