AWS S3 uploading and downloading from Linux command line

I recently wrote a bash script that automates a database backups to zipped files on a Raspberry Pi. I would then periodically SSH in and transfer the backup files.

This was a simple temporarily and manual solution, but I wanted a way to automate sending these files to a remote backup. I use AWS quite often, so my immediate plan was to transfer the files to S3 (Amazon’s simply storage platform). I found that Amazon has a very nifty command-line tool for AWS including S3.

Here are my notes…

Installation

The platform I’m demonstrating with is Raspbian Jessie. This should be much the same for other Debian-based Linux distros, like Ubuntu.