def METHOD_NAME():
    # Global event parameters
    global user
    global host
    global port
    global database
    global sns_arn
    global region
    try:
        sql_query = """select /* Lambda Redshift Query Monitoring SNS Notifications */  userid,query,service_class,trim(rule) as rule,trim(action) as action,recordtime from stl_wlm_rule_action WHERE userid > 1 AND recordtime >= GETDATE() - INTERVAL '{interval}' order by recordtime desc;""".format(interval = interval)
        # Use Data API function to connect to Redshift
        print("Connecting as Redshift user: " + user)
        # Use Data API function to connect to Redshift
        result_rows = execute_api_sql(sql_query, host, None, port, database, user)
        if( result_rows is None):
            print("No results from QMR query")
        else:
            # Get the results from the returned dictionary
            objects_list = []
            for row in result_rows:
                print(row)
                userid,query,service_class,rule,action,recordtime  = row
                d = collections.OrderedDict()
                d['clusterid'] = clusterid
                d['database'] = database
                d['userid'] = userid
                d['query'] = query
                d['service_class'] = service_class
                d['rule'] = rule
                d['action'] = action
                d['recordtime'] = recordtime #--.isoformat()
                objects_list.append(d)
            #Publish to SNS if any rows fetched
            if len(objects_list) == 0:
                print('No rows to publish to SNS')
            else:
                print("Publishing rows to SNS")
                query_result_json = json.dumps(objects_list)
                response = publish_to_sns(query_result_json)
        print('Completed Succesfully ')
        return 'Success'
    except:
        print('Query Failed: exception %s' % sys.exc_info()[1])
        return 'Failed'