We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
detail
1 parent 4d8ee53 commit 8e17b82Copy full SHA for 8e17b82
datadog_lambda/trigger.py
@@ -138,8 +138,11 @@ def parse_event_source(event: dict) -> _EventSource:
138
event_source = _EventSource(EventTypes.EVENTBRIDGE)
139
140
event_detail = event.get("detail")
141
- cw_event_categories = event_detail and event_detail.get("EventCategories")
142
- if event.get("source") == "aws.events" or cw_event_categories:
+ has_event_categories = (
+ isinstance(event_detail, dict)
143
+ and event_detail.get("EventCategories") is not None
144
+ )
145
+ if event.get("source") == "aws.events" or has_event_categories:
146
event_source = _EventSource(EventTypes.CLOUDWATCH_EVENTS)
147
148
event_record = get_first_record(event)
0 commit comments