How to Sync Data from Computer to Amazon S3 Bucket? September 14, 2019December 23, 2024 Sharjeel Ashraf Cloud Amazon S3 a.k.a Simple Storage Service (S3) is one of the most secure and efficient ways to store data on the cloud. Businesses can’t work without data, it is a critical component of every business’s workflow. However, managing data is a challenge. This challenge increases manifold when this data is huge in size and difficult to manage. That’s where Amazon S3 storage comes to help. We would like to relate the term S3 to 3 key features. Simple, Secure, Scalable. In short, Amazon S3 makes it super-easy to access data and work from any corner of the globe. Think about it, you are a business that would like to store data over the Internet, then S3 storage is an ideal choice. A few scenarios where people would be using Amazon S3 bucket to store their data and information are: For storing images available on your website. Since the hosting server will get slow by loading all these images at once, it is better if you load them from a different cloud storage For storing software programs that people will come to download from your website. You can store these software solutions on cloud storage to distribute the load For storing databases and product information that people will see on your eCommerce store, minimizing server load and improving performance In short, the benefits of using cloud storage like Amazon S3 are numerous. Sync Data from Computer to Amazon S3 Most cloud users use Amazon S3 bucket storage to add files directly to the Amazon server. This saves them time and improves accessibility. In fact, experts recommend users to use cloud storage instead of local servers to avoid any possible data loss. Create an Amazon S3 Storage bucket Let’s see how you can easily create an Amazon S3 storage bucket and add up data to it. Launch the Amazon S3 storage by clicking on the console tab. Now, open the S3 dashboard and create a storage bucket by clicking on the Create bucket button. Creating a new S3 bucket You will need to add a DNS-compliant username to the S3 bucket. DNS-compliant username includes web address .e.g. MyAWSbucket.s3.amazonaws.com/yourobject. For more information on this, read the Bucket Restrictions and Limitations blog post. Filling up the relevant fields for the new bucket Fill up all the relevant fields and then click Create to finalize the process. Once your bucket is ready, you can easily add files and folders to it. Using Amazon S3 FileSync to Transfer Data from Your PC Amazon S3 FileSync is an open-source software that helps users sync files with Amazon S3. This means you can transfer files to and from your PC to Amazon S3 account at the click of a button. Amazon S3 FileSync is a third-party tool because there is no official GUI software available to transfer files from PC to Amazon S3. Amazon S3 FileSync software is completely free and you can download it from Codeplex. To sync your PC data to Amazon S3 storage, you will have to first connect to the storage through the file sync software. Launch the software and connect to the Amazon S3 Storage using the toggle option. Add your AWS KeyID and AWS Secret Key. Enter the AWS KeyID and Secret Key Now select the folder that you would want to back up to the cloud. The software uploads small files first and then moves to the bigger files. Once these files have been uploaded, you can disconnect from the storage by closing the Amazon S3 FileSync software. Congratulations! You have successfully added files to Amazon S3 storage from your PC. Amazon S3 FileSync allows you to upload files in bulk as well. However, this facility is not available with the GUI interface within the S3 drive. Next, we will discuss how to directly upload files from Amazon S3’s main panel. Go to the S3 dashboard and then click the bucket of your choice. Selecting the bucket of your choice Click Upload and browse the file that you would like to upload. You can also drag items to the bucket to add them automatically to the storage. While these were two simple methods to upload data directly from the PC to Amazon S3 Storage, you can also use the Amazon S3 Storage CLI Command. Here is how to do so: Download the installer and execute it to launch the installation. Open Command Prompt by pressing the Windows + R keys combination. Type in cmd and hit Enter. Now, in the console that pops up, type in aws configure. It will ask for the AWS Key and AWS Secret Key. Note: If you don’t have the AWS Key and AWS Secret Key with you, you will have to download them as a credentials.csv file. For that purpose, create your AWS IAM User by following the instructions on this link. Now add the default region Default region name [None]: enter us-east-1 Default output format [None]: enter json If you haven’t created a bucket yet, you can add it by using the following command: aws s3 mb s3://my-first-backup-bucket To upload files to Amazon S3 storage using CLI, use the following command: aws s3 cp “C:\users\my first backup.bak” s3://my-first-backup-bucket/ Note: In this case, our file name ‘my first backup.bak’ contains spaces. Use the original syntax for all files. Now, if you would want to download data to your PC, use the following command: aws s3 cp s3://my-first-backup-bucket/my-first-backup.bak ./ Note: The filename has replaced spaces with ‘-’ in the uploaded file. So, make sure to use the right syntax for downloading the files.You can remove the file from the cloud storage by using the CLI command. To remove the file from Amazon S3 storage use: aws s3 rm s3://my-first-backup-bucket/my-first-backup.bakThat’s it! You can now successfully upload, download, and delete files from Amazon S3 Storage with great ease!