"""SNS common functions.""" import json import boto3 def send_notification(topic_arn, message_payload): """Send SNS message. Args: topic_arn (str): SNS topic ARN. message_payload (dict): SNS message data. Returns: dict: Info about published message. """ client = boto3.client('sns') return client.publish( TopicArn=topic_arn, Message=json.dumps(message_payload))