def canonical_message_builder(content, fmt):
    """ Builds the canonical message to be verified.
        Sorts the fields as a requirement from AWS
        Args:
            content (dict): Parsed body of the response
            fmt (list): List of the fields that need to go into the message
        Returns (str):
            canonical message
    """
    m = ""

    for field in sorted(fmt):
        try:
            m += field + "\n" + content[field] + "\n"
        except KeyError:
            # Build with what you have
            pass

    return bytes(m, 'utf-8')