getting data to S3 using ssh

Written in

by

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'' 's/^# *user_allow_other/user_allow_other/' /etc/fuse.conf # uncomment user_allow_other
sudo mkdir /mnt/mybucket
git clone https://github.com/danilop/yas3fs.git
cd yas3fs/contrib/
sudo cp mount.yas3fs /usr/local/sbin/
sudo chmod +x /usr/local/sbin/mount.yas3fs
cd /sbin; sudo ln -s /usr/local/sbin/mount.yas3fs
sudo echo 'yas3fs#mybucket /mnt/mybucket yas3fs _netdev,allow_other,default_permissions,yas3fslog,yas3fsdebug 0 0' >> /etc/fstab

Now you can scp files to your s3 buckets like this:

scp file ec2-user@:/mnt/mybucket/

Tags