For Kinesis, it seems to be, that AWS organizes its folders on S3 like: "prefix/2019/02/09/13/kinesis-stream-name-2019-02-09-10-02-32-db1db7a9-c484-40d1-b7ec-7651a55e4677"

The date in the path is UTC-time, the date in the file name is the UTC-time of the first received byte in the Kinesis stream for the specific file. This is the default behavior, so it would be nice to implement it in localstack.
for lib in libs:
        paths = [lib, '%s.py' % lib]
        try:
            module = importlib.import_module(lib)
            paths.append(module.__file__)
        except Exception:
            pass
        target_dir = tmp_dir
        root_folder = os.path.join(LOCALSTACK_VENV_FOLDER, 'lib/python*/site-packages')
        if lib == 'localstack':
            paths = ['localstack/*.py', 'localstack/utils']
            root_folder = LOCALSTACK_ROOT_FOLDER
            target_dir = os.path.join(tmp_dir, lib)
            mkdir(target_dir)
        for path in paths:
            file_to_copy = path if path.startswith('/') else os.path.join(root_folder, path)
            for file_path in glob.glob(file_to_copy):
                name = os.path.join(target_dir, file_path.split(os.path.sep)[-1])
                if os.path.isdir(file_path):
                    copy_dir(file_path, name)
                else:
                    shutil.copyfile(file_path, name)
    
    result = create_zip_file(tmp_dir, get_content=get_content)
    return result
def delete_lambda_function(name):
    client = aws_stack.connect_to_service('lambda')
    client.delete_function(FunctionName=name)
def create_zip_file_cli(source_path, base_dir, zip_file):