Im trying to have a replica of my s3 bucket in a local folder. it should be updated when a change occurs on the bucket.
Question posted in Amazon Web Sevices
The official Amazon Web Services documentation can be found here.
The official Amazon Web Services documentation can be found here.
2
Answers
You can use the
aws cli s3 sync
command to copy (‘synchronize’) files from an Amazon S3 bucket to a local drive.To have it update frequently, you could schedule it as a Windows Scheduled Tasks. Please note that it will be making frequent calls to AWS, which will incur API charges (
$0.005 per 1000 requests
).Alternatively, you could use utilities that ‘mount’ an Amazon S3 bucket as a drive (Tntdrive, Cloudberry, Mountain Duck, etc). I’m not sure how they detect changes — they possibly create a ‘virtual drive’ where the data is not actually downloaded until it is accessed.
You can use rclone and Winfsp to mount S3 as a drive.
Though this might not be a ‘mount’ in traditional terms.
You will need to setup a task scheduler for a continuous sync.
Example : https://blog.spikeseed.cloud/mount-s3-as-a-disk/