Frollo wrote: ↑
Sun Jul 15, 2018 9:43 am
As far as i am concerned, i would have simply done that with FTP and a shell script...
The script and the crontab are definitely good advice but to the idea that FTP is acceptable in 2018 I vigorously and vehemently (but hopefully politely) object. AWS costs real money and when unwanted guests get in via FTP, that will be felt economically in addition to the trouble it causes everyone else. So instead of using FTP to send the user name, password, and data over the wild net without any encryption whatsoever
it would be much better to use SFTP or Rsync.
From a script perspective, SFTP can work approximately the same way as deprecated, old FTP. However, it has several advantages such as 1) being secure, 2) being able to use SSH keys for authentication.
gyanezfeliu wrote: ↑
Sat Jul 14, 2018 2:45 pm
Amazon has its S3 SDK for python and it's pretty easy to send the images using the mqtt protocol.
Do you think a better way for doing this?
I'd say SFTP or Rsync, probably the latter.
For MQTT to be used safely, it should be tunneled over SSL
. With less work it could be tunneled over SSH but if you are going to use SSH anyway then you might as well just use SFTP or Rsync. Rsync might be the least trouble since it only sends the new data
and won't resend the old, meaning that you won't also need a separate mechanism to find the newest files to transfer. That is important when you have metered bandwidth:
Code: Select all
rsync -a -e 'ssh -i /home/foo/.ssh/aws_rsa_key' /some/local/directory/*.jpeg yourserver.example.org:/var/www/pictures/