Open nmathewa opened 1 week ago
# download the files from aws cli
"""
aws s3 ls --no-sign-request s3://noaa-nws-hafs-pds/hfsb/20241006/12/
"""
import os
import subprocess
# just one file with no-sign-request
#subprocess.run(['aws','s3','cp', '--no-sign-request' ,f's3://noaa-nws-hafs-pds/{prefix_dir}','/Users/nalex2023/temp/'],check=True)
outfol = '/Users/nalex2023/Temp/cyclone_dsets/'
fol_name = f'{name}{dt_final}'
os.makedirs(outfol+fol_name,exist_ok=True)
for i in range(len(dft)):
subprocess.run(['aws','s3','cp', '--no-sign-request' ,f's3://noaa-nws-hafs-pds/hfsb/20241006/12/{dft.loc[i,"filename"]}',outfol+fol_name],check=True)
install aws cli
Retrieve event driven data from amazon s3