Febooti, Ltd.

Sync AWS S3 between accounts

Suppose that there are two separate Amazon AWS accounts, each with its own S3 storage. These two S3 buckets need to be synchronized between Amazon accounts. To do this, we will use Automation Workshop no-code solution. No scripting, no PowerShell, no AWS CLI required.

The files are synchronized between buckets automagically like when using Dropbox or Google Drive's Backup and Sync.

Overview

Usually, syncing two Amazon S3 accounts involves changing access permissions for one or even both accounts, however, with Automation Workshop it is very easy to synchronize two buckets in two separate accounts without changing object access permissions or any AWS policies.

We are going to do the syncing process in two steps. In the first step we are going to copy files from the first Amazon account to local HDD. Then, in the second step, we auto-sync files from the local folder to second Amazon account.

To save network bandwidth, Automation Workshop is only syncing files that was modified since the last session. This mechanism is similar to the popular Linux utility rsync, but this one is designed especially for Amazon S3 buckets.

Task scheduler · Recur every 1 hour

How to create a Task, that will sync two Amazon S3 buckets automatically? First, create a new Task and add built-in Task scheduler Trigger, that will launch the job hourly. Then, add Connect to Amazon S3 Action, give it a name First S3 Account, and use Access key ID and Secret access key from the first account you want to synchronize.

Then, add Synchronize directories Action, set Local folder to some existing location on your HDD. Note, that this location must exist, it should be empty, and it must be the same in both steps. Also, set the Remote directory to the bucket and path you want to synchronize. Set transfer direction to Download.

Connect to s3.amazonaws.com · Synchronize files · Download

Now, that we have synced files from the first account to local computer, use the similar steps to sync files back to cloud—to the second account. Add another Connect to Amazon S3 Action, provide credentials from the second account, and name it Second S3 Account.

Then, add another Synchronize directories Action, provide the same Local folder as in previous step. Also, specify /bucket-name/path to the second account, and change Transfer setting to Upload, and select Second S3 Account under Use connection setting.

Connect to s3.amazonaws.com · Synchronize files · Upload

How to send email on successful or failed S3 sync? Optionally, you can setup email notifications. The notifications will be sent in two cases—when synchronization task finishes successfully, and when it fails. In case it fails, the email will contain the last error message, such as no internet connection or similar. More detailed information about all the events is available in the Log Manager.

Task 'Sync Amazons AWS S3' Properties · Advanced fallback

Summary

The task is up and running! It consists of 1 Trigger and 4 Actions. Task scheduler Trigger is set to start the whole process automatically every hour, no user interaction is needed. Once set up, Automation Workshop runs fully unattended in the background as a Windows service without requiring the user to log in.

Task 'Sync Amazons AWS S3' Properties · 4 Actions

Synchronize directories Action automatically scans for new, changed, and deleted files and folders on the first remote server. It synchronizes content to local folder we have specified. The second Synchronize directories Action syncs the local folder to the second Amazon S3 account.

The email notifications are used to notify system administrators about successful or failed synchronization process. It is also possible to retry all the process automatically when an unexpected error occurs.

Note

The schedule of the task can be changed to exclude weekends or nighttime. Also, it is possible to add Amazon S3 watcher Trigger, to launch the synchronization process as soon as there are changes at the remote server.

Connection to Amazons S3 bucket requires Access key ID and Secret access key. Learn more on how to create Access key ID and Secret access key.

Still have a question?

If you have any questions, please do not hesitate to contact our support team.

1,282,565
We're growing fast. Thank you!

Video · Monitor an FTP server & send invoice via email

Your PC automated!
Recent news
  • January 7, 2020
    Automation Workshop v4.0.0 introduces SFTP, FTP, Amazon S3 and WebDAV watchers. 15 new Cloud & FTP Actions. Entirely new and redesigned user experience across entire product.
  • March 14, 2019
    Automation Workshop v3.2.0 ensure smooth For each Action execution. Also, improves Task opening speed.
  • January 3, 2019
    Automation Workshop v3.1.0 with Windows Server 2019 support and multiple UX and UI improvements.
Automation Workshop has allowed us to focus on our vision instead of mundane trivialities.—Jacob E.
Last updated: April 2, 2020
Mar 30, 2020 · 16:20
0.005 · 0.000
0.3 · 3.9