(self, message, uid)
return aws_info
This gets the most important details from AWS SNS notifications for
        Complaints and Bounces.

        Relevant AWS Dcoumentation:
        https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-examples.html

        :param message: raw message
        :param uid: SMTP uid of message
        :return: list of AwsMeta objects
This gets the most important details from AWS SNS notifications for
        Complaints and Bounces.
This gets the most important details from AWS SNS notifications for Complaints and Bounces .
def _get_aws_info(self, message, uid):
        """
        This gets the most important details from AWS SNS notifications for
        Complaints and Bounces.

        Relevant AWS Dcoumentation:
        https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-examples.html

        :param message: raw message
        :param uid: SMTP uid of message
        :return: list of AwsMeta objects
        """
        aws_info = []
        base_info = self._get_message_json(message)

        if base_info.get('notificationType'):
            message_info = base_info
        else:
            message_info = base_info.get('Message')
            if isinstance(message_info, str):
                message_info = json.loads(message_info)

        if not message_info:
            return aws_info

        if message_info['notificationType'] not in [
            NotificationType.BOUNCE,
            NotificationType.COMPLAINT,
        ]:
            metrics_counter(
                'commcare.bounced_email_manager.unknown_notification_type'
            )
            self._label_problem_email(
                uid,
                extra_labels=['UnknownAWSNotificationType']
            )
            _bounced_email_soft_assert(
                False,
                f'[{settings.SERVER_ENVIRONMENT}] '
                f'Unknown AWS Notification Type sent to Inbox. '
            )
        else:
            aws_info = get_relevant_aws_meta(message_info)

        return aws_info
def _get_aws_info ( self , message , uid ) : aws_info = [ ] base_info = self . _get_message_json ( message ) if base_info . get ( 'notificationType' ) : message_info = base_info else : message_info = base_info . get ( 'Message' ) if isinstance ( message_info , str ) : message_info = json . loads ( message_info ) if not message_info : return aws_info if message_info [ 'notificationType' ] not in [ NotificationType . BOUNCE , NotificationType . COMPLAINT , ] : metrics_counter ( 'commcare.bounced_email_manager.unknown_notification_type' ) self . _label_problem_email ( uid , extra_labels = [ 'UnknownAWSNotificationType' ] ) _bounced_email_soft_assert ( False , f'[{settings.SERVER_ENVIRONMENT}] ' f'Unknown AWS Notification Type sent to Inbox. ' ) else : aws_info = get_relevant_aws_meta ( message_info ) return aws_info