def get_config_rule_invoke_success(config, rule_name):
    """Compares the config rule's last successful invocation time
    and the last success evaluation time and
    returns success or failed if eval time is older than inovke time.

    Args:
        config: boto3 config object
        rule_name: config rule name

    Returns:
        Last successful invoke time
        Success or failed invocation
    """
    rule_status = config.describe_config_rule_evaluation_status(ConfigRuleNames=[rule_name])
    rule_invocation_time = rule_status['ConfigRulesEvaluationStatus'][0]['LastSuccessfulInvocationTime']
    rule_eval_time = rule_status['ConfigRulesEvaluationStatus'][0]['LastSuccessfulEvaluationTime']

    if  rule_invocation_time < rule_eval_time:
        invocation_result = "SUCCESS"
    else:
        invocation_result = "FAIL"

    return rule_invocation_time, invocation_result