title: Automatically mounting S3 bucket using s3fs on Amazon CentOS
body: <p>I have tried all the answers provided in similar questions but none is helpful.</p>
  
  <p>I installed S3 Fuse so that I can mount S3 bucket. After the installation, I performed the following the steps:</p>
  
  <p>Step 1 Create the mount point for S3 bucket mkdir –p /var/s3fs-drive-fs
  Step 2 Then I am able to mount the S3 bucket in the new directory with the IAM role by running the following commands: s3fs myresearchdatasets /var/s3fs-drive-fs -o iam_role=EC2-to-S3-Buckets-Role -o allow_other, and it works fine.</p>
  
  <p>However, I found out that the bucket disappears each time I reboot the system, which means I have to run the command above to remount the S3 bucket each time after restarting the system. </p>
  
  <p>I found the steps to complete an Automatic mount at reboot by editing the fstab file with the lines below</p>
  
  <p>s3fs myresearchdatasets /var/s3fs-drive-fs fuse_netdev,allow_other,iam_role=EC2-to-S3-Buckets-Role,umask=777, 0 0</p>
  
  <p>To check whether the fstab is working correctly, I tried mount /var/s3fs-drive-fs/</p>
  
  <p>but I got the following errors, "mount: can't find /var/s3fs-drive-fs/ in /etc/fstab"</p>
  
  <p>Can anyone help me please?</p>