def send_email_sns(sender, subject, message, topic_ARN, image_png):
 from boto3 import resource as boto3_resource
 sns = boto3_resource('sns')
 topic = sns.Topic(topic_ARN[0])
 if (len(subject) > 100):
  subject = ((subject[0:48] + '...') + subject[(-49):])
 response = topic.publish(Subject=subject, Message=message)
 logger.debug('Message sent to SNS.\nMessageId: {},\nRequestId: {},\nHTTPSStatusCode: {}'.format(response['MessageId'], response['ResponseMetadata']['RequestId'], response['ResponseMetadata']['HTTPStatusCode']))

def send_email_sns ( sender , subject , message , topic_ARN , image_png ) : from boto3 import resource as boto3_resource sns = boto3_resource ( 'sns' ) topic = sns . Topic ( topic_ARN [ 0 ] ) if ( len ( subject ) > 100 ) : subject = ( ( subject [ 0 : 48 ] + '...' ) + subject [ ( - 49 ) : ] ) response = topic . publish ( Subject = subject , Message = message ) logger . debug ( 'Message sent to SNS.\nMessageId: {},\nRequestId: {},\nHTTPSStatusCode: {}' . format ( response [ 'MessageId' ] , response [ 'ResponseMetadata' ] [ 'RequestId' ] , response [ 'ResponseMetadata' ] [ 'HTTPStatusCode' ] ) )
sends notification through aws sns .