def issnswrapped(logitem):
    """
    Checks if the message is in an SNS wrapper
    """
    return 'Type' in logitem and logitem['Type'] == 'Notification' and 'Message' in logitem and 'MessageId' in logitem