{"id":2238,"date":"2021-12-30T16:20:23","date_gmt":"2021-12-30T13:20:23","guid":{"rendered":"https:\/\/artem.services\/?p=2211"},"modified":"2022-06-08T20:33:03","modified_gmt":"2022-06-08T17:33:03","slug":"2238","status":"publish","type":"post","link":"https:\/\/artem.services\/?p=2238&lang=en","title":{"rendered":"\u00a0S3 &#8212; Mounting in Linux"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-214\" src=\"https:\/\/artem.services\/wp-content\/uploads\/2018\/11\/AWS-Logo.png\" alt=\"\" width=\"975\" height=\"450\" srcset=\"https:\/\/artem.services\/wp-content\/uploads\/2018\/11\/AWS-Logo.png 975w, https:\/\/artem.services\/wp-content\/uploads\/2018\/11\/AWS-Logo-300x138.png 300w, https:\/\/artem.services\/wp-content\/uploads\/2018\/11\/AWS-Logo-768x354.png 768w, https:\/\/artem.services\/wp-content\/uploads\/2018\/11\/AWS-Logo-954x440.png 954w\" sizes=\"(max-width: 975px) 100vw, 975px\" \/><\/p>\n<p>In order to mount an S3 Bucket as a file system, you need to install <a href=\"https:\/\/github.com\/s3fs-fuse\/s3fs-fuse\" target=\"_blank\" rel=\"noopener\">s3fs<\/a><\/p>\n<p>Create a directory to mount:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmkdir -p \/mnt\/s3\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>And add the following to &quot;<strong>\/etc\/fstab<\/strong>&quot;:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nartem-service-bucket:\/upload\/ \/mnt\/s3 fuse.s3fs _netdev,rw,nosuid,nodev,allow_other,nonempty,iam_role,umask=022,url=https:\/\/s3.eu-central-1.amazonaws.com,endpoint=eu-central-1 0 0\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>Where:<\/p>\n<ul>\n<li>&quot;artem-service-bucket:\/upload\/&quot; &#8212; <span class=\"VIiyi\" lang=\"en\"><span class=\"JLqJ4b ChMk0b\" data-language-for-alternatives=\"en\" data-language-to-translate-into=\"ru\" data-phrase-index=\"0\" data-number-of-phrases=\"1\"><span class=\"Q4iAWc\">S3 bucket name and the directory inside the bucket to mount<\/span><\/span><\/span><\/li>\n<li>&quot;url=https:\/\/s3.eu-central-1.amazonaws.com,endpoint=eu-central-1&quot; &#8212; the region where the S3 bucket is located<\/li>\n<li>&quot;iam_role&quot; &#8212; indicate that we will use the IAM Role for authentication<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>Mount:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmount -a\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In order to mount an S3 Bucket as a file system, you need to install s3fs Create a directory to mount: &nbsp; And add the following to &quot;\/etc\/fstab&quot;: &nbsp; Where: &quot;artem-service-bucket:\/upload\/&quot; &#8212; S3 bucket name and the directory inside the bucket to mount &quot;url=https:\/\/s3.eu-central-1.amazonaws.com,endpoint=eu-central-1&quot; &#8212; the region where the S3 bucket is located &quot;iam_role&quot; &#8212; &hellip; <a href=\"https:\/\/artem.services\/?p=2238&#038;lang=en\" class=\"more-link\">\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0447\u0438\u0442\u0430\u0442\u044c<span class=\"screen-reader-text\"> &quot;\u00a0S3 &#8212; Mounting in Linux&quot;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[599],"tags":[543,371,1811],"_links":{"self":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/2238"}],"collection":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2238"}],"version-history":[{"count":2,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/2238\/revisions"}],"predecessor-version":[{"id":2240,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/2238\/revisions\/2240"}],"wp:attachment":[{"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}