s3_upload_cronjob.sh
Cron job to upload files on s3
#!/bin/bash
end=$((SECONDS+300))
mkdir -p samay
cd samay
while [ $SECONDS -lt $end ]; do
    # Do what you want.
    touch $(date "+%F-%T")_file.txt
    sleep 60
    aws s3 sync ../samay s3://<bucket_name>/  --region ap-south-1
    :
done
