def build_evaluation(configuration_item, compliance_type, annotation=None):
    """Generate an evaluation object based on the config item and compliance:
    configuration_item -- the configuration item being evaluated
    compliance_type -- either COMPLIANT, NON_COMPLIANT or NOT_APPLICABLE
    annotation -- an annotation to be added to the evaluation (default None)
    """
    eval_cc = {}

    if annotation:
        eval_cc["Annotation"] = annotation
    eval_cc["ComplianceResourceType"] = configuration_item["resourceType"]
    eval_cc["ComplianceResourceId"] = configuration_item["resourceId"]
    eval_cc["ComplianceType"] = compliance_type
    eval_cc["OrderingTimestamp"] = configuration_item["configurationItemCaptureTime"]

    return eval_cc