def publish_to_sns(signup_data):
    try:
        sns_conn.publish(application.config['NEW_SIGNUP_TOPIC'], json.dumps(signup_data), "New signup: %s" % signup_data['email'])
    except Exception as ex:
        sys.stderr.write("Error publishing subscription message to SNS: %s" % ex.message)
dataset/ETHPy150Open awslabs/eb-py-flask-signup/application.py/publish_to_sns/original