import string
import random


def create_record(data: str) -> dict:
    """
    Create a single Kinesis Record for use with PutRecords API

    :param data: A string to convert to record
    :return: Kinesis Record for PutRecords API
    """
    random_alphanumerical = (
        string.ascii_lowercase + string.ascii_uppercase + string.digits
    )

    data_blob = data.encode("utf-8")
    partition_key: str = "".join(
        random.choices(random_alphanumerical, k=20)
    )  # max 256 chars
    return {"Data": data_blob, "PartitionKey": partition_key}