grizli.utils.fetch_s3_url(url='s3://bucket/path/to/file.txt', file_func=<function <lambda>>, skip_existing=True, verbose=True)[source]

Fetch file from an S3 bucket

url : str

S3 url of a file to download

file_func : function

Function applied to the file name extracted from url, e.g., to set output directory, rename files, set a prefix, etc.

local_file : str

Name of local file or None if failed to parse url

status : int

Bit flag of results: 1 == file found, 2 = download successful