I have a project to complete and I am stuck at a point. Could we upload files from our server into S3 automatically at a certain time interval?
For example: A part of the data should be uploaded and from then, for every one hour, the next set of data should get uploaded.
Follow this steps;
Add this to the script.sh file and save the file
#!/bin/bash
aws s3 cp /local-folder-path/ s3://bucket-name`
Install AWS CLI
Create a IAM user that has access to that S3 bucket and add his AWS Key and Key secret to AWS Configure
Link
Set up a cron job for 1 hour. And you are done those files will be copied to S3 bucket each hour.
0 */1 * * * /path-to-script-file/script.sh`
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With