DanielDaCosta / cloudwatch-alarms

CloudWatch-SNS-Lambda integration that sends alarm notification to discord channel
Apache License 2.0
7 stars 5 forks source link

Getting 400 response in cloudwatch logs #1

Open OxHimanshu opened 1 year ago

OxHimanshu commented 1 year ago
Screenshot 2022-12-19 at 8 19 41 PM
truekoi commented 1 year ago

Hi @OxHimanshu in case if it still relevant for you and for any who might found this usefull - The issue is that Discord don't accept None format and it may be occured at least for lines

15

        "value": event["Trigger"]["Dimensions"][0]["value"] if len(event["Trigger"]["Dimensions"]) > 0 else 'no data',

&&&

25

        "value": event.get("AlarmDescription") if event.get("AlarmDescription") == True else "no description",

above is workaround that work fine for me (at least so far ) :)

DanielDaCosta commented 1 year ago

Hey @truekoi thanks for the solution. Please @OxHimanshu let me know if it works for you too