def get_table_items(dynamodb, table_name):
    """Retrieves all rows from the specified DynamoDB table.

    Args:
        dynamodb: boto3 DynamoDB object
        table_name: Table we want to retrieve the records from

    Returns:
        List of items from the table
    """
    table_items = []

    for page in dynamodb.get_paginator("scan").paginate(TableName=table_name):
        table_items += page["Items"]

    return table_items