Skip to content

Instantly share code, notes, and snippets.

@amzar96
Created May 16, 2024 06:22
Show Gist options
  • Save amzar96/7b5dd9c90798c7d5482c836423efc4ac to your computer and use it in GitHub Desktop.
Save amzar96/7b5dd9c90798c7d5482c836423efc4ac to your computer and use it in GitHub Desktop.
Download S3 using CLI
datelist=('20240501' '20240502' '20240503' '20240504')
for date in "${datelist[@]}"; do
mkdir -p "/Users/mohdamzar96/Downloads/$date"
aws s3 sync "s3://bucket-name/by-date/$date/" "/Users/mohdamzar96/Downloads/$date"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment