(https://m4u7i4y4.rocketcdn.me/favicon.ico) (https://m4u7i4y4.rocketcdn.me/favicon.ico) (/res/css/new/parts/header.min.css?v=020120240722) (/res/css/new/parts/menu.min.css?v=020120240722) (/res/css/allold_unmin_blog.css?v=020120240722) Mounting S3 Bucket as a Filesystem in Linux & Windows (https://www.nakivo.com/blog/mount-amazon-s3-as-a-drive-how-to-guide/) (//m4u7i4y4.rocketcdn.me) (https://m4u7i4y4.rocketcdn.me) (https://m4u7i4y4.rocketcdn.me/res/fonts/OpenSans-Bold.woff2) (https://m4u7i4y4.rocketcdn.me/res/css/new/main.min.css) (https://www.facebook.com/NakivoInc) (https://www.linkedin.com/company/nakivo) (https://www.twitter.com/nakivo/) (https://www.youtube.com/user/NAKIVOinc) Company (/company/about-nakivo/) About NAKIVO (/company/media-coverage/) Media Coverage (/company/press-releases/) Press Releases (/company/events/) Events (/company/contact-us/) Contact us (tel:+442070971535) () Sales +44 207 097 1535 (tel:+442071931230) () Support +44 207 193 1230 (/) Why NAKIVO (/company/why-nakivo/) Why NAKIVO Explore top-rated data protection at an affordable price (/success-stories/) Customer stories Learn how organizations of all sizes and industries successfully protect data with NAKIVO Solution briefs (https://www.nakivo.com/res/files/nakivo-backup-replication-datasheet.pdf) Product Datasheet (https://www.nakivo.com/msp-backup/solution-brief.pdf) Backup Solution for MSPs (https://www.nakivo.com/res/files/virtualization-backup-solution-brief.pdf) Backup for Virtualization (https://www.nakivo.com/microsoft-office-365-backup/Microsoft-Office-365-solution-brief.pdf) Microsoft 365 Backup (https://www.nakivo.com/ransomware-protection/solution-brief.pdf) Ransomware Protection (https://www.nakivo.com/res/files/real-time-replication-solution-brief.pdf) Real-Time Replication BETA (Gartner® Magic QuadrantTM) NAKIVO Receives an Honorable Mention Gartner® Magic QuadrantTM 2022 Enterprise Backup and Recovery Solution Solutions Backup Virtual: (/vmware-backup/) VMware | (/hyper-v-backup/) Hyper-V | (/nutanix-ahv-backup/) Nutanix AHV Physical server: (/windows-server-backup/) Windows | (/linux-server-backup/) Linux Workstations: (/windows-workstation-backup/) Windows | (/linux-workstation-backup/) Linux SaaS: (/microsoft-office-365-backup/) Microsoft 365 Cloud: (/aws-ec2-instance-backup/) Amazon EC2 File Share: (/nas-backup/) NAS | (/file-server-backup/) File Server Apps: (/windows-server-backup/sql/) SQL | (/windows-server-backup/active-directory/) Active Directory (/windows-server-backup/exchange/) Exchange | (/oracle-backup/) Oracle Database Replication Virtual: (/vmware-replication/) VMware | (/hyper-v-replication/) Hyper-V Cloud: (/aws-ec2-instance-replication/) Amazon EC2 (/msp-backup/) MSP SOLUTION (/vm-disaster-recovery/) DISASTER RECOVERY (/vmware-disaster-recovery/) VMware Disaster Recovery (/real-time-replication/) REAL-TIME REPLICATION beta (/it-monitoring/vmware-monitoring/) IT MONITORING CYBERSECURITY (/ransomware-protection/) Ransomware Protection (/features/malware-scan-for-backup/) Backup Malware Scan END USERS (/industry/smb-backup/) SMB | (/industry/enterprise/) Enterprise | (/industry/education/) Education (/industry/robo-backup/) Remote Office Backup (/multi-cloud-and-hybrid-cloud-backup/) Hybrid Cloud Backup BOOK FREE DEMO (/how-to-buy/request-demo/) Request a Demo (/how-to-buy/request-deployment-session/) Book an Installation Session TRY FOR FREE (/resources/download/trial-download/) Free Trial (/msp-backup/free-trial/) Free Trial for MSP (/resources/download/free-edition/) Free Edition INTEGRATIONS NAS BACKUP APPLIANCE (/backup-appliance/qnap-nas/) QNAP (/backup-appliance/synology/) Synology (/backup-appliance/asustor-nas/) ASUSTOR (/backup-appliance/freenas/) FreeNAS (/backup-appliance/netgear-readynas/) NETGEAR (/backup-appliance/raspberry-pi/) Raspberry Pi (/backup-appliance/western-digital-nas/) Western Digital BACKUP TARGETS (/backup-to-cloud/) Cloud (/backup-to-amazon-s3/) Amazon S3 (/backup-to-wasabi/) Wasabi (/backup-to-azure-blob/) Azure Blob (/backup-to-backblaze-b2/) Backblaze B2 (/backup-to-seagate-lyve-cloud/) LyveCloud (/s3-compatible-storage/) S3-Compatible Storage Air-gapped storage (/backup-to-tape/) Tape STORAGE INTEGRATIONS Deduplication appliances (/backup-appliance/emc-data-domain-boost/) EMC Data Domain (/hpe-storeonce-catalyst/) HPE StoreOnce (/storage-integration/nec-hydrastor/) NEC HYDRAstor Storage snapshots (/backup-from-storage-snapshots/) Backup from HPE Storage Snapshots Pricing Pricing (/how-to-buy/pricing/) Pricing and Editions (/how-to-buy/pricing_calculator/) Pricing Calculator (/resources/promo/trade-in-promo/) Trade-In WHERE TO BUY (/how-to-buy/request-quote/) Get a Quote (/how-to-buy/resellers/) Find a Reseller (/how-to-buy/find-an-msp-provider/) Find an MSP RENEWAL (/renewal/) Renew License Partners RESELLERS More growth opportunities with the NAKIVO Partner Program (/partner/why-partner-for-resellers/) Why Partner (/partner/partner-sign-up/) Solution Partner Signup (/partner/register-a-deal/) Deal Registration (/how-to-buy/resellers/) Find a Reseller SERVICE PROVIDERS Grow your customer base with powerful BaaS and DRaaS (/partner/why-partner-for-msp/) Why Partner (/partner/managed-service-provider-sign-up/) MSP Partner Signup (/how-to-buy/find-an-msp-provider/) Find an MSP TECHNOLOGY PARTNERS (/company/technology-partners/) Technology Partners (/partner/storage-certification-registration/) Storage Certification Program ALREADY A PARTNER? (https://portal.nakivo.com/web/login) Log In to the Partner Portal Support (https://helpcenter.nakivo.com/) SUPPORT RESOURCES Find answers to your questions in our technical documentation (https://helpcenter.nakivo.com/User-Guide/Content/Overview/Overview.htm) User Guide (https://helpcenter.nakivo.com/Knowledge-Base/Content/Frequently-Asked-Questions/Frequently-Asked-Questions.htm) Knowledge Base (https://helpcenter.nakivo.com/Release-Notes/Content/Release-Notes.htm) Release Notes (https://helpcenter.nakivo.com/api-reference/Content/API-Reference-Overview.htm) API Reference Guide (https://helpcenter.nakivo.com/display/support/) SUPPORT CENTER Reach out to our highly-rated support team about any issues (https://helpcenter.nakivo.com/User-Guide/Content/Settings/Support-Bundles.htm) Send Support Bundle (/resources/) RESOURCES (/blog/) Blog (https://forum.nakivo.com/) Forum (/webinars/) Webinars (/how-to-videos/) How-to Videos (/resources/download/trial-download/) Start Free Trial (https://www.nakivo.com/blog/mount-amazon-s3-as-a-drive-how-to-guide/) EN () DE () IT () ES () FR () RU () UA (/cn/) 中文 Why NAKIVO (/company/why-nakivo/) Why NAKIVO Explore top-rated data protection at an affordable price (/success-stories/) Customer stories Learn how organizations of all sizes and industries successfully protect data with NAKIVO Solution briefs (https://www.nakivo.com/res/files/nakivo-backup-replication-datasheet.pdf) Product Datasheet (https://www.nakivo.com/msp-backup/solution-brief.pdf) Backup Solution for MSPs (https://www.nakivo.com/res/files/virtualization-backup-solution-brief.pdf) Backup for Virtualization (https://www.nakivo.com/microsoft-office-365-backup/Microsoft-Office-365-solution-brief.pdf) Microsoft 365 Backup (https://www.nakivo.com/ransomware-protection/solution-brief.pdf) Ransomware Protection (https://www.nakivo.com/res/files/real-time-replication-solution-brief.pdf) Real-Time Replication BETA (Gartner® Magic QuadrantTM) NAKIVO Receives an Honorable Mention Gartner® Magic QuadrantTM 2022 Enterprise Backup and Recovery Solution Solutions Backup Virtual: (/vmware-backup/) VMware | (/hyper-v-backup/) Hyper-V | (/nutanix-ahv-backup/) Nutanix AHV Physical server: (/windows-server-backup/) Windows | (/linux-server-backup/) Linux Workstations: (/windows-workstation-backup/) Windows | (/linux-workstation-backup/) Linux SaaS: (/microsoft-office-365-backup/) Microsoft 365 Cloud: (/aws-ec2-instance-backup/) Amazon EC2 File Share: (/nas-backup/) NAS | (/file-server-backup/) File Server Apps: (/windows-server-backup/sql/) SQL | (/windows-server-backup/active-directory/) Active Directory (/windows-server-backup/exchange/) Exchange | (/oracle-backup/) Oracle Database Replication Virtual: (/vmware-replication/) VMware | (/hyper-v-replication/) Hyper-V Cloud: (/aws-ec2-instance-replication/) Amazon EC2 (/msp-backup/) MSP SOLUTION (/vm-disaster-recovery/) DISASTER RECOVERY (/vmware-disaster-recovery/) VMware Disaster Recovery (/real-time-replication/) REAL-TIME REPLICATION beta (/it-monitoring/vmware-monitoring/) IT MONITORING CYBERSECURITY (/ransomware-protection/) Ransomware Protection (/features/malware-scan-for-backup/) Backup Malware Scan END USERS (/industry/smb-backup/) SMB | (/industry/enterprise/) Enterprise | (/industry/education/) Education (/industry/robo-backup/) Remote Office Backup (/multi-cloud-and-hybrid-cloud-backup/) Hybrid Cloud Backup BOOK FREE DEMO (/how-to-buy/request-demo/) Request a Demo (/how-to-buy/request-deployment-session/) Book an Installation Session TRY FOR FREE (/resources/download/trial-download/) Free Trial (/msp-backup/free-trial/) Free Trial for MSP (/resources/download/free-edition/) Free Edition INTEGRATIONS NAS BACKUP APPLIANCE (/backup-appliance/qnap-nas/) QNAP (/backup-appliance/synology/) Synology (/backup-appliance/asustor-nas/) ASUSTOR (/backup-appliance/freenas/) FreeNAS (/backup-appliance/netgear-readynas/) NETGEAR (/backup-appliance/raspberry-pi/) Raspberry Pi (/backup-appliance/western-digital-nas/) Western Digital BACKUP TARGETS (/backup-to-cloud/) Cloud (/backup-to-amazon-s3/) Amazon S3 (/backup-to-wasabi/) Wasabi (/backup-to-azure-blob/) Azure Blob (/backup-to-backblaze-b2/) Backblaze B2 (/backup-to-seagate-lyve-cloud/) LyveCloud (/s3-compatible-storage/) S3-Compatible Storage Air-gapped storage (/backup-to-tape/) Tape STORAGE INTEGRATIONS Deduplication appliances (/backup-appliance/emc-data-domain-boost/) EMC Data Domain (/hpe-storeonce-catalyst/) HPE StoreOnce (/storage-integration/nec-hydrastor/) NEC HYDRAstor Storage snapshots (/backup-from-storage-snapshots/) Backup from HPE Storage Snapshots Pricing Pricing (/how-to-buy/pricing/) Pricing and Editions (/how-to-buy/pricing_calculator/) Pricing Calculator (/resources/promo/trade-in-promo/) Trade-In WHERE TO BUY (/how-to-buy/request-quote/) Get a Quote (/how-to-buy/resellers/) Find a Reseller (/how-to-buy/find-an-msp-provider/) Find an MSP RENEWAL (/renewal/) Renew License Partners RESELLERS More growth opportunities with the NAKIVO Partner Program (/partner/why-partner-for-resellers/) Why Partner (/partner/partner-sign-up/) Solution Partner Signup (/partner/register-a-deal/) Deal Registration (/how-to-buy/resellers/) Find a Reseller SERVICE PROVIDERS Grow your customer base with powerful BaaS and DRaaS (/partner/why-partner-for-msp/) Why Partner (/partner/managed-service-provider-sign-up/) MSP Partner Signup (/how-to-buy/find-an-msp-provider/) Find an MSP TECHNOLOGY PARTNERS (/company/technology-partners/) Technology Partners (/partner/storage-certification-registration/) Storage Certification Program ALREADY A PARTNER? (https://portal.nakivo.com/web/login) Log In to the Partner Portal Support (https://helpcenter.nakivo.com/) SUPPORT RESOURCES Find answers to your questions in our technical documentation (https://helpcenter.nakivo.com/User-Guide/Content/Overview/Overview.htm) User Guide (https://helpcenter.nakivo.com/Knowledge-Base/Content/Frequently-Asked-Questions/Frequently-Asked-Questions.htm) Knowledge Base (https://helpcenter.nakivo.com/Release-Notes/Content/Release-Notes.htm) Release Notes (https://helpcenter.nakivo.com/api-reference/Content/API-Reference-Overview.htm) API Reference Guide (https://helpcenter.nakivo.com/display/support/) SUPPORT CENTER Reach out to our highly-rated support team about any issues (https://helpcenter.nakivo.com/User-Guide/Content/Settings/Support-Bundles.htm) Send Support Bundle (/resources/) RESOURCES (/blog/) Blog (https://forum.nakivo.com/) Forum (/webinars/) Webinars (/how-to-videos/) How-to Videos Company (/company/about-nakivo/) About NAKIVO (/company/media-coverage/) Media Coverage (/company/press-releases/) Press Releases (/company/events/) Events (https://www.nakivo.com/blog/mount-amazon-s3-as-a-drive-how-to-guide/) EN () DE () IT () ES () FR () RU () UA (/cn/) 中文 (/company/contact-us/) Contact us (tel:+442070971535) Sales +44 207 097 1535 (tel:+442071931230) Support +44 207 193 1230 (/resources/download/trial-download/) Start Free Trial (https://www.facebook.com/NakivoInc) (https://www.linkedin.com/company/nakivo) (https://www.twitter.com/nakivo/) (https://www.youtube.com/user/NAKIVOinc) (/) NAKIVO > (/blog/) Blog > (https://www.nakivo.com/blog/platform/multiplatform/) Multiplatform How to Mount Amazon S3 as a Drive for Cloud File Sharing Updated: December 6, 2023 Written by: (https://www.nakivo.com/company/about-nakivo/#team) NAKIVO Team In Amazon S3, data is stored in “buckets”, the basic unit of data storage. You can configure permissions for users to access the buckets via the AWS web interface. If you want access to AWS S3 to be available without a web browser, you can allow users to use the interface of an operating system such as Linux, Windows, or macOS. Access to Amazon S3 cloud storage from the command line can be handy in several scenarios. This is particularly useful with operating systems that don’t have a graphical user interface (GUI), in particular VMs running in a public cloud, and for automating tasks such as copying files or creating (https://www.nakivo.com/blog/introduction-cloud-backup/) cloud data backups . Read on to learn how to mount Amazon S3 bucket as a filesystem on a Linux machine and as a drive to a local directory on Windows and macOS machines to be able to use AWS S3 without a web browser. (1 Year of Free Data Protection: NAKIVO Backup & Replication) 1 Year of Free Data Protection: NAKIVO Backup & Replication Deploy in 2 minutes and protect virtual, cloud, physical and SaaS data. Backup, replication, instant recovery options. (https://www.nakivo.com/resources/download/free-edition/) Get the Free Edition How to Mount an S3 Bucket as a filesystem in Linux AWS provides an API to work with Amazon S3 buckets using third-party applications. You can even write your own application that can interact with S3 buckets by using the Amazon API. You can create an application that uses the same path for uploading files to Amazon S3 cloud storage and provide the same path on each computer by mounting the S3 bucket to the same directory with S3FS. In this tutorial, we use S3FS to mount an Amazon S3 bucket as a disk drive to a Linux directory. (https://github.com/s3fs-fuse/) S3FS is a special solution based on FUSE (file system in user space), developed to mount S3 buckets to directories of Linux operating systems, similarly to the way you mount (https://www.nakivo.com/blog/nfs-vs-smb/) CIFS or NFS share as a network drive. S3FS is a free and open-source solution. After mounting Amazon S3 cloud storage with S3FS to your Linux machine, you can use cp , mv , rm , and other commands in the Linux console to operate with files as you do when working with mounted local or network drives. Let’s mount an Amazon S3 bucket to a Linux directory with Ubuntu 18.04 LTS as an example. A fresh installation of Ubuntu is used in this walkthrough. You can use the same principle for newer versions. Update the repository tree: sudo apt-get update If any existing FUSE is installed on your Linux system, remove that FUSE before configuring the environment and installing fuse-f3fs to avoid conflicts. As we’re using a fresh installation of Ubuntu, we don’t run the sudo apt-get remove fuse command to remove FUSE. Install s3fs from online software repositories: sudo apt-get install s3fs You need to generate the access key ID and secret access key in the AWS web interface for your account (IAM user). The IAM user must have S3 full access. You can use this link:(https://console.aws.amazon.com/iam/home?#/security_credentials) https://console.aws.amazon.com/iam/home?#/security_credentials NOTE: It is recommended that you mount Amazon S3 buckets as a regular user with restricted permissions and use users with administrative permissions only for generating keys. These keys are needed for AWS API access. You must have administrative permissions to generate the AWS access key ID and AWS secret access key. If you don’t have enough permissions, ask your system administrator to generate the AWS keys for you. The administrator can generate the AWS keys for a user account in the Users section of the AWS console in the Security credentials tab by clicking the Create access key button.(https://www.nakivo.com/blog/wp-content/uploads/2020/06/Generating-access-keys-for-Amazon-S3-cloud-storage.webp) (Generating access keys for Amazon S3 cloud storage) In the Create access key popup window, click Download .csv file or click Show under the Secret access key row name. This is the only case when you can see the secret access key in the AWS web interface. Store the AWS access key ID and secret access key in a safe place.(https://www.nakivo.com/blog/wp-content/uploads/2020/06/Amazon-cloud-drive-S3-saving-access-keys-for-Amazon-S3-cloud-storage.webp) (saving access keys for Amazon S3 cloud storage) You can open the downloaded CSV file that contains access keys in Microsoft Office 365 Excel, for example.(https://www.nakivo.com/blog/wp-content/uploads/2020/06/Access-keys-for-Amazon-S3-cloud-storage-are-saved.webp) (Access keys for Amazon S3 cloud storage are saved) Go back to the Ubuntu console to create a configuration file for storing the AWS access key and secret access key needed to mount an S3 bucket with S3FS. The command to do this is: echo ACCESS_KEY:SECRET_ACCESS_KEY > PATH_TO_FILE Change ACCESS_KEY to your AWS access key and SECRET_ACCESS_KEY to your secret access key. In this example, we will store the configuration file with the AWS keys in the home directory of our user. Make sure that you store the file with the keys in a safe place that is not accessible to unauthorized persons. echo AKIA4SK3HPQ9FLWO8AMB:esrhLH4m1Da+3fJoU5xet1/ivsZ+Pay73BcSnzP > ~/.passwd-s3fs Check whether the keys were written to the file: cat ~/.passwd-s3fs Set correct permissions for the passwd-s3fs file where the access keys are stored: chmod 600 ~/.passwd-s3fs Create the directory (mount point) that will be used as a mount point for your S3 bucket. In this example, we create the Amazon cloud drive S3 directory in the home user’s directory. mkdir ~/s3-bucket You can also use an existing empty directory. The name of the bucket used in this walkthrough is blog-bucket01 . The text1.txt file is uploaded to our blog-bucket01 in Amazon S3 before mounting the bucket to a Linux directory. It is not recommended to use a dot (. ) in bucket names.(https://www.nakivo.com/blog/wp-content/uploads/2020/06/A-text-file-is-uploaded-to-the-S3-bucket-in-the-web-interface.webp) (A text file is uploaded to the S3 bucket in the web interface) Let’s mount the bucket. Use the following command to set the bucket name, the path to the directory used as the mount point, and the file that contains the AWS access key and secret access key. s3fs bucket-name /path/to/mountpoint -o passwd_file=/path/passwd-s3fs In our case, the command we use to mount our bucket is: s3fs blog-bucket01 ~/s3-bucket -o passwd_file=~/.passwd-s3fs The bucket is mounted. We can run the commands to check whether our bucket (blog-bucket-01 ) has been mounted to the s3-bucket directory: mount | grep bucket df -h | grep bucket Let’s check the contents of the directory to which the bucket has been mounted: ls -al ~/s3-bucket As you can see in the screenshot below, the test1.txt file uploaded via the web interface before is present and displayed in the console output.(https://www.nakivo.com/blog/wp-content/uploads/2020/06/The-bucket-has-been-mounted-as-a-network-disk-in-Linux-and-contents-can-be-viewed-in-the-console.webp) (The bucket has been mounted as a network disk in Linux and contents can be viewed in the console) Now you can try to create a new file on your hard disk drive and copy that file to the S3 bucket in your Linux console. echo test2 > test2.txt cp test2.txt ~/s3-bucket/ Update the AWS web page where your files in the bucket are displayed. You should see the new test2.txt file copied to the S3 bucket in the Linux console by using the directory to which the bucket is mounted.(https://www.nakivo.com/blog/wp-content/uploads/2020/06/The-data-displayed-in-the-web-interface-of-AWS-is-synchronized-after-copying-files-in-the-Linux-console.webp) (The data displayed in the web interface of AWS is synchronized after copying files in the Linux console) How to mount an S3 bucket on Linux boot automatically If you want to configure the automatic mount of an S3 bucket with S3FS on your Linux machine, you have to create the passwd-s3fs file in /etc/passwd-s3fs , which is the standard location. After creating this file, you don’t need to use the -o passwd_file key to set the location of the file with your AWS keys manually. Create the /etc/passwd-s3fs file: vim /etc/passwd-s3fs NOTE: If vim the text editor has not been installed yet in your Linux, run the apt-get install vim command. Enter your AWS access key and secret access key as explained above. AKIA4SK3HPQ9FLWO8AMB:esrhLH4m1Da+3fJoU5xet1/ivsZ+Pay73BcSnzcP As an alternative, you can store the keys in the /etc/passwd-s3fs file with the command: echo AKIA4SK3HPQ9FLWO8AMB:esrhLH4m1Da+3fJoU5xet1/ivsZ+Pay73BcSnzcP > /etc/passwd-s3fs Set the required permissions for the /etc/passwd-s3fs file: chmod 640 /etc/passwd-s3fs Edit the FUSE configuration file: vim /etc/fuse.conf Uncomment the user_allow_other string if you want to allow using Amazon S3 for file sharing by other users (non-root users) on your Linux machine.(https://www.nakivo.com/blog/wp-content/uploads/2020/06/Configuring-auto-mounting-of-Amazon-S3-cloud-storage-in-Linux.webp) (Configuring auto mounting of Amazon S3 cloud storage in Linux) Open /etc/fstab with a text editor: vim /etc/fstab Add the line in the end of the file: s3fs#blog-bucket01 /home/user1/s3-bucket/ fuse _netdev,allow_other,url=https://s3.amazonaws.com 0 0 (https://www.nakivo.com/blog/wp-content/uploads/2020/06/Editing-etc-fstab-to-mount-an-S3-bucket-automatically-on-Linux-boot.webp) (Editing etc fstab to mount an S3 bucket automatically on Linux boot) Save the edited /etc/fstab file and quit the text editor. Note: If you want to set the owner and group, you can use the -o uid=1001 -o gid=1001 -o mp_umask=002 parameters (change the digital values of the user id, group id and umask according to your configuration). If you want to enable cache, use the -ouse_cache=/tmp parameter (set a custom directory instead of /tmp/ if needed). You can set the number of times to retry mounting a bucket if the bucket was not mounted initially by using the retries parameter. For example, retries=5 sets five tries. Reboot the Ubuntu machine to check whether the S3 bucket is mounted automatically on system boot: init 6 Wait until your Linux machine is booted. You can run commands to check whether the AWS S3 bucket was mounted automatically to the s3-bucket directory son Ubuntu boot. mount | grep bucket df -h | grep bucket ls -al /home/user1/s3-bucket/ In our case, the Amazon cloud drive S3 has been mounted automatically to the specified Linux directory on Ubuntu boot (see the screenshot below). The configuration was applied successfully. (https://www.nakivo.com/blog/wp-content/uploads/2020/06/The-Amazon-S3-bucket-has-been-mounted-successfully-on-Linux-boot.webp) (The Amazon S3 bucket has been mounted successfully on Linux boot) S3FS also supports working with rsync and file caching to reduce traffic. Mounting Amazon S3 Cloud Storage in Windows You can try wins3fs , which is a solution equivalent to S3FS for mounting Amazon S3 cloud storage as a network disk in Windows. However, in this section, we are going to use rclone . Rclone is a command line tool that can be used to mount and synchronize cloud storage, such as Amazon S3 buckets, (https://www.nakivo.com/blog/aws-vs-azure-vs-google-cloud-comparison/) Google Cloud Storage , (https://www.nakivo.com/blog/onedrive-vs-google-drive/) Google Drive , (https://www.nakivo.com/blog/onedrive-backup-vs-onedrive-sync-myths-and-facts/) Microsoft OneDrive , DropBox, and so on. Rclone is a free open-source tool that can be downloaded from the official website and from GitHub. You can download the needed version of rclone by using one of these links: (https://rclone.org/downloads/) https://rclone.org/downloads/ (https://github.com/rclone/rclone/releases/tag/v1.51.0) https://github.com/rclone/rclone/releases/tag/v1.51.0 Let’s use the direct link from the official website: (https://downloads.rclone.org/v1.51.0/rclone-v1.51.0-windows-amd64.zip) https://downloads.rclone.org/v1.51.0/rclone-v1.51.0-windows-amd64.zip You can use this workflow for newer versions of rclone after they are released. The following actions are performed in the command line interface and may be useful for users who use Windows without a GUI on servers or VMs. Open Windows PowerShell as Administrator . Create the directory to download and store rclone files: mkdir c:\rclone Go to the created directory: cd c:\rclone Download rclone by using the direct link mentioned above. Edit the version number in the link if you download another version. Invoke-WebRequest -Uri "https://downloads.rclone.org/v1.51.0/rclone-v1.51.0-windows-amd64.zip" -OutFile "c:\rclone\rclone.zip" Extract files from the downloaded archive: Expand-Archive -path 'c:\rclone\rclone.zip' -destinationpath '.\' Check the contents of the directory: dir (https://www.nakivo.com/blog/wp-content/uploads/2020/06/Installing-rclone-in-Windows.webp) (Installing rclone in Windows) The files are extracted to C:\rclone\rclone-v1.51.0-windows-amd64 in this case. NOTE: In this example, the name of the rclone directory after extracting files is rclone-v1.51.0-windows-amd64 . However, it is not recommended to use dots (. ) in directory names. You can rename the directory to rclone-v1-51-win64 , for example. Let’s copy the extracted files to C:\rclone\ to avoid dots in the directory name: cp C:\rclone\rclone-v1.51.0-windows-amd64\*.* C:\rclone\ (https://www.nakivo.com/blog/wp-content/uploads/2020/06/Rclone-is-extracted-in-Windows.webp) (Rclone is extracted in Windows) Run rclone in the configuring mode: .\rclone.exe config (https://www.nakivo.com/blog/wp-content/uploads/2020/06/Running-rclone-in-the-configuring-mode.webp) (Running rclone in the configuring mode) The configurator is working as a wizard in the command line mode. You have to select the needed parameters at each step of the wizard. Type n and press Enter to select the New remote option . n/s/q> n Enter the name of your S3 bucket: name> blog-bucket01 After entering the name, select the type of cloud storage to configure. Type 4 to select Amazon S3 cloud storage. Storage> 4 Choose your S3 provider. Type 1 to select Amazon Web Services S3. provider> 1 (https://www.nakivo.com/blog/wp-content/uploads/2020/06/Choosing-the-S3-provider.webp) (Choosing the S3 provider) Get AWS credentials from runtime (true or false). 1 (false) is used by default. Press Enter without typing anything to use the default value. env_auth> 1 Enter your AWS access key: access_key_id> AKIA4SK3HPQ9FLWO8AMB Enter your secret access key: secret_access_key> esrhLH4m1Da+3fJoU5xet1/ivsZ+Pay73BcSnzcP (https://www.nakivo.com/blog/wp-content/uploads/2020/06/Configuring-S3-access-and-region.webp) (Configuring S3 access and region) Region to connect to. EU (Ireland) eu-west-1 is used for our bucket in this example and we should type 6 . region> 6 (https://www.nakivo.com/blog/wp-content/uploads/2020/06/Selecting-the-AWS-region.webp) (Selecting the AWS region) Endpoint for S3 API. Leave blank if using AWS to use the default endpoint for the region. Press Enter . Endpoint> Location constraint must be set to match the Region. Type 6 to select the EU (Ireland) Region \ “eu-west-1” . location_constraint> 6 Canned ACL used when creating buckets and storing or copying objects. Press Enter to use the default parameters. acl> Specify the (https://www.nakivo.com/blog/amazon-s3-encryption-configuration-overview/) server-side encryption algorithm used when storing this object in S3. In our case encryption is disabled, and we have to type 1 (None). server_side_encryption> 1 (https://www.nakivo.com/blog/wp-content/uploads/2020/06/Selecting-encryption-options.webp) (Selecting encryption options) If using KMS ID, you must provide the ARN of Key. As encryption is not used, type 1 (None). sse_kms_key_id> 1 Select the storage class to use when storing new objects in S3. Enter a string value. The standard storage class option (2 ) is suitable in our case. storage_class> 2 (https://www.nakivo.com/blog/wp-content/uploads/2020/06/Selecting-storage-class.webp) (Selecting storage class) Edit advanced config? (y/n) y/n> n Check your configuration and type y (yes) if everything is correct. t/e/d> y (https://www.nakivo.com/blog/wp-content/uploads/2020/06/Checking-rclone-configuration.webp) (Checking rclone configuration) Type q to quit the configuration wizard. e/n/d/r/c/s/q> q Rclone is now configured to work with Amazon S3 cloud storage. Make sure you have the correct date and time settings on your Windows machine. Otherwise an error can occur when mounting an S3 bucket as a network drive to your Windows machine: Time may be set wrong. The difference between the request time and the current time is too large . Run rclone in the directory where rclone.exe is located and list buckets available for your AWS account: .\rclone.exe lsd blog-bucket01: (https://www.nakivo.com/blog/wp-content/uploads/2020/06/Listing-S3-buckets-with-rclone.webp) (Listing S3 buckets with rclone) You can enter c:\rclone to the Path environment variable. It allows you to run rclone from any directory without switching to the directory where rclone.exe is stored. As you can see on the screenshot above, access to Amazon S3 cloud storage is configured correctly and a list of buckets is displayed (including the blog-bucket01 that is used in this tutorial). Install Chocolately , which is a Windows package manager that can be used to install applications from online repositories: Set-ExecutionPolicy Bypass -Scope Process -Force; ` iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) WinFSP (Windows File System Proxy) is the Windows analog of the Linux FUSE and it is fast, stable and allows you to create user mode file systems. Install WinFSP from Chocolatey repositories: choco install winfsp -y (https://www.nakivo.com/blog/wp-content/uploads/2020/06/Installing-WinFSP.webp) (Installing WinFSP) Now you can mount your Amazon S3 bucket to your Windows system as a network drive. Let’s mount the blog-bucket01 as S: .\rclone mount blog-bucket01:blog-bucket01/ S: --vfs-cache-mode full Where the first “blog-bucket” is the bucket name entered in the first step of the rclone configuration wizard and the second “blog-bucket” that is defined after “:” is the Amazon S3 bucket name set in the AWS web interface.(https://www.nakivo.com/blog/wp-content/uploads/2020/06/Mounting-the-S3-bucket-as-a-network-drive-with-rclone-in-Windows.webp) (Mounting the S3 bucket as a network drive with rclone in Windows) List all connected disks and partitions: gdr -PSProvider 'FileSystem' Check the content of the mapped network drive: ls S: The S3 bucket is now mounted as a network drive (S:). You can see three txt files stored in the blog-bucket01 in Amazon S3 cloud storage by using another instance of Windows PowerShell or Windows command line.(https://www.nakivo.com/blog/wp-content/uploads/2020/06/The-Amazon-S3-cloud-storage-is-mounted-with-rclone-in-Windows.webp) (The Amazon S3 cloud storage is mounted with rclone in Windows) If your Windows has a graphical user interface, you can use that interface to download and upload files to your Amazon S3 cloud storage. If you copy a file by using a Windows interface (a graphical user interface or command line interface), data will be synchronized in a moment and you will see a new file in both the Windows interface and AWS web interface. (https://www.nakivo.com/blog/wp-content/uploads/2020/06/Accessing-files-stored-in-the-S3-bucket-from-Windows-Explorer-and-a-web-browser.webp) (Accessing files stored in the S3 bucket from Windows Explorer and a web browser) If you press Ctrl+C or close the CMD or PowerShell window where rclone is running (“The service clone has been started” is displayed in that CMD or PowerShell instance), your Amazon S3 bucket will be disconnected from the mount point (S: in this case). How to automate mounting an S3 bucket on Windows boot It is convenient when the bucket is mounted as a network drive automatically on Windows boot. Let’s find out how to configure the automatic mounting of the S3 bucket in Windows. Create the rclone-S3.cmd file in the C:\rclone\ directory. Add the string to the rclone-S3.cmd file: C:\rclone\rclone.exe mount blog-bucket01:blog-bucket01/ S: –vfs-cache-mode full Save the CMD file. You can run this CMD file instead of typing the command to mount the S3 bucket manually. Copy the rclone-S3.cmd file to the startup folder for all users: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp As an alternative, you can create a shortcut to C:\Windows\System32\cmd.exe and set the arguments needed to mount an S3 bucket in the target properties: C:\Windows\System32\cmd.exe /k cd c:\rclone & rclone mount blog-bucket01:blog-bucket01/ S: –vfs-cache-mode full (https://www.nakivo.com/blog/wp-content/uploads/2020/06/Creating-a-shortcut-to-mount-an-S3-bucket-with-rclone.webp) (Creating a shortcut to mount an S3 bucket with rclone) Then add the edited shortcut to the Windows startup folder: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp There is a small disadvantage – a command line window with the “The service rclone has been started ” message is displayed after attaching an S3 bucket to your Windows machine as a network drive. You can try to configure automatic mounting of the S3 bucket by using Windows scheduler or NSSM, which is a free tool to create and configure Windows services and their automatic startup. Mounting S3 bucket as a File System in macOS You can mount an Amazon S3 bucket to macOS in the same way as in Linux. You should install S3FS on(https://www.nakivo.com/blog/run-mac-os-on-vmware-esxi/) macOS and set permissions and Amazon keys. In this example, macOS 10.15 Catalina is used. You can use this configuration principle in newer versions as well. The name of the S3 bucket is blog-bucket01 , the macOS user name isuser1 , and the directory used as a mount point for the bucket is /Volumes/s3-bucket/ . Let’s look at the configuration step by step. Install homebrew , which is a package manager for macOS used to install applications from online software repositories: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" Install osxfuse : brew cask install osxfuse Reboot the system: sudo shutdown -r now Install S3FS: brew install s3fs Once S3FS is installed, set the access key and secret access key for your Amazon S3 bucket. You can define keys for the current session if you need to mount the bucket for one time or if you are going to mount the bucket infrequently: export AWSACCESSKEYID=AKIA4SK3HPQ9FLWO8AMB export AWSSECRETACCESSKEY=esrhLH4m1Da+3fJoU5xet1/ivsZ+Pay73BcSnzP If you are going to use a mounted bucket regularly, set your AWS keys in the configuration file used by S3FS for your macOS user account: echo AKIA4SK3HPQ9FLWO8AMB:esrhLH4m1Da+3fJoU5xet1/ivsZ+Pay73BcSnzP > ~/.passwd-s3fs If you have multiple buckets and keys to access the buckets, define them in the format: echo bucket-name:access-key:secret-key > ~/.passwd-s3fs Set the correct permissions to allow read and write access only for the owner: chmod 600 ~/.passwd-s3fs Create a directory to be used as a mount point for the Amazon S3 bucket: sudo mkdir -p /Volumes/s3-bucket/ Your user account must be set as the owner for the created directory:sudo chown user1 /Volumes/s3-bucket/ (https://www.nakivo.com/blog/wp-content/uploads/2020/06/Configuring-environment-for-mounting-Amazon-S3-cloud-storage-in-macOS.webp) (Configuring environment for mounting Amazon S3 cloud storage in macOS) Mount the bucket with S3FS: s3fs blog-bucket01 /Volumes/s3-bucket/ The macOS security warning is displayed in the dialog window. Click Open System Preferences to allow the S3FS application and related connections.(https://www.nakivo.com/blog/wp-content/uploads/2020/06/The-macOS-security-warning-is-displayed-when-mounting-the-bucket.webp) (The macOS security warning is displayed when mounting the bucket) In the Security & Privacy window click the lock to make changes and then hit the Allow button.(https://www.nakivo.com/blog/wp-content/uploads/2020/06/Allowing-S3FS-in-the-Security-Privacy-settings-of-macOS.webp) (Allowing S3FS in the Security & Privacy settings of macOS) Run the mounting command once again: s3fs blog-bucket01 /Volumes/s3-bucket/ A popup warning message is displayed: Terminal would like to access files on a network volume . Click OK to allow access.(https://www.nakivo.com/blog/wp-content/uploads/2020/06/Allowing-the-terminal-to-access-files-on-a-network-volume.webp) (Allowing the terminal to access files on a network volume) Check whether the bucket has been mounted: mount | grep bucket Check the contents of the bucket: ls -al /Volumes/s3-bucket/ The bucket is mounted successfully. You can view, copy and delete files in the bucket.(https://www.nakivo.com/blog/wp-content/uploads/2020/06/The-S3-bucket-is-mounted-successfully-in-macOS.webp) (The S3 bucket is mounted successfully in macOS) You can try to configure mounting an S3 bucket on user login with launchd . Conclusion When you know how to mount Amazon S3 cloud storage as a file system to the most popular operating systems, sharing files with Amazon S3 becomes more convenient. An Amazon S3 bucket can be mounted by using S3FS in Linux, macOS and by using rclone or wins3fs in Windows. Automating the process of copying data to Amazon S3 buckets after mounting the buckets to local directories of your operating system is more convenient compared to using the web interface. You can copy your data to Amazon S3 to create a backup by using the interface of your operating system. You can try to use dedicated backup applications that use AWS APIs to access S3 buckets. NAKIVO Backup & Replication is a complete data protection solution with integrated support for S3 buckets as backup targets. You can use the solution to back up data in VMware VMs, Hyper-V VMs, and EC2 instances to Amazon S3. (Direct Backup to AWS S3 | NAKIVO) Direct Backup to AWS S3 | NAKIVO Avoid a single point of failure with simple Amazon S3 integration and anti-ransomware immutability options. Automated backup tiering and instant recovery features. (https://www.nakivo.com/backup-to-amazon-s3/) DISCOVER SOLUTION People also read (https://www.nakivo.com/blog/hyper-v-export-import/) (Picture) Hyper-V Export and Import: What, Why, and How (https://www.nakivo.com/blog/office-2021-vs-microsoft-365/) (Picture) Office 2021 vs. Microsoft 365: Complete Comparison (https://www.nakivo.com/blog/deploying-hyper-v-vdi-guide/) (Picture) Deploying Hyper-V VDI: A How-To Guide Load Comments Table of Contents: How to Mount an S3 Bucket as a filesystem in Linux Mounting Amazon S3 Cloud Storage in Windows Mounting S3 bucket as a File System in macOS Conclusion Subscribe to Our Blog (5) (5) (0) (0) (sub) (2) (Enter email address) Subscribe Request a live demo by one of our engineers (/how-to-buy/request-demo/) Request Demo Download a full-featured free trial (/resources/download/trial-download/) Download See the full list of features, editions and prices (/how-to-buy/pricing/) See Pricing Sales Email: sales@nakivo.com Fax: +1 408 516 9464 Americas: +1 408 335 7367 (worldwide) EMEA: +44 20 7097 1535 Taiwan: +886 2 7735 4556 Support Email: support@nakivo.com Americas: +1 702 605 4495 Europe: +44 207 193 1230 Asia: +852 8124 5782 Get special offers and updates: (5) (5) (0) (0) (sub) (2) (Enter your Email) Subscribe NAKIVO on social media: (https://www.facebook.com/NakivoInc/) (https://www.linkedin.com/company/nakivo/) (https://twitter.com/Nakivo) (https://www.youtube.com/user/NAKIVOinc) (VMware Gold Award) (VMware technology alliance) (Nutanix ready AHV integrated) (G2Crowd 2018 Summer Leader) (Software.informer award) (TrustRadius award) (Spiceworks award) © 2024 NAKIVO, Inc. All Rights Reserved (/support/privacy-policy/) Privacy Policy | (/support/eula/) EULA ()