88from typing import TYPE_CHECKING , Any
99
1010from botocore .exceptions import ClientError
11- from moto .core .parsers import XFormedDict
1211from moto .ses import ses_backends
1312from moto .ses .models import SESBackend
1413
@@ -688,7 +687,7 @@ def _client_for_topic(topic_arn: str) -> "SNSClient":
688687def notify_event_destinations (
689688 context : RequestContext ,
690689 # FIXME: Moto stores the Event Destinations as a single value when it should be a list
691- event_destinations : XFormedDict ,
690+ event_destinations : EventDestination | list [ EventDestination ] ,
692691 payload : EventDestinationPayload ,
693692 email_type : EmailType ,
694693):
@@ -698,14 +697,14 @@ def notify_event_destinations(
698697 event_destinations = [event_destinations ]
699698
700699 for event_destination in event_destinations :
701- if not event_destination ["enabled " ]:
700+ if not event_destination ["Enabled " ]:
702701 continue
703702
704- sns_destination_arn = event_destination .get ("sns_destination " , {}).get ("topic_arn " )
703+ sns_destination_arn = event_destination .get ("SNSDestination " , {}).get ("TopicARN " )
705704 if not sns_destination_arn :
706705 continue
707706
708- matching_event_types = event_destination .get ("matching_event_types " ) or []
707+ matching_event_types = event_destination .get ("MatchingEventTypes " ) or []
709708 if EventType .send in matching_event_types :
710709 emitter .emit_send_event (
711710 payload , sns_destination_arn , emit_source_arn = email_type != EmailType .TEMPLATED
0 commit comments