{"id":436,"date":"2018-03-27T13:41:37","date_gmt":"2018-03-27T12:41:37","guid":{"rendered":"http:\/\/www.nax.cz\/?p=436"},"modified":"2018-03-27T13:41:37","modified_gmt":"2018-03-27T12:41:37","slug":"getting-data-to-s3-using-ssh","status":"publish","type":"post","link":"https:\/\/nax.cz\/?p=436","title":{"rendered":"getting data to S3 using ssh"},"content":{"rendered":"<p>Pretty amazing way to use SSH protocol to send data to S3 bucket:<\/p>\n<p>https:\/\/github.com\/danilop\/yas3fs<\/p>\n<p>A few commands and you are good to go:<\/p>\n<p>1. run amazon EC2 instance<br \/>\n2. run commands:<br \/>\n<code><br \/>\nsudo yum -y install fuse fuse-libs<br \/>\nsudo easy_install pip<br \/>\nsudo pip install yas3fs # assume root installation<br \/>\nsudo sed -i'' 's\/^# *user_allow_other\/user_allow_other\/' \/etc\/fuse.conf # uncomment user_allow_other<br \/>\nsudo mkdir \/mnt\/mybucket<br \/>\ngit clone https:\/\/github.com\/danilop\/yas3fs.git<br \/>\ncd yas3fs\/contrib\/<br \/>\nsudo cp mount.yas3fs \/usr\/local\/sbin\/<br \/>\nsudo chmod +x \/usr\/local\/sbin\/mount.yas3fs<br \/>\ncd \/sbin; sudo ln -s \/usr\/local\/sbin\/mount.yas3fs<br \/>\nsudo echo 'yas3fs#mybucket \/mnt\/mybucket yas3fs _netdev,allow_other,default_permissions,yas3fslog,yas3fsdebug 0 0' >> \/etc\/fstab<br \/>\n<\/code><\/p>\n<p>Now you can scp files to your s3 buckets like this:<\/p>\n<p><code>scp file ec2-user@<ec2_ip>:\/mnt\/mybucket\/<\/ec2_ip><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pretty amazing way to use SSH protocol to send data to S3 bucket: https:\/\/github.com\/danilop\/yas3fs A few commands and you are good to go: 1. run amazon EC2 instance 2. run commands: sudo yum -y install fuse fuse-libs sudo easy_install pip sudo pip install yas3fs # assume root installation sudo sed -i&#8220; &#8218;s\/^# *user_allow_other\/user_allow_other\/&#8216; \/etc\/fuse.conf # [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-436","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/nax.cz\/index.php?rest_route=\/wp\/v2\/posts\/436","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nax.cz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nax.cz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nax.cz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nax.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=436"}],"version-history":[{"count":0,"href":"https:\/\/nax.cz\/index.php?rest_route=\/wp\/v2\/posts\/436\/revisions"}],"wp:attachment":[{"href":"https:\/\/nax.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nax.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=436"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nax.cz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}