When you make use of (some of the) Amazon services there is a big chance S3 is one of them for the storage of files, be it temporary or more permanent. When you are using this service of AWS and you want to combine this with scripting possibilities you should have a look at the s3cmd library.
I installed the tool on my Mac and use it quite often (automatic backups of certain directories for instance). It makes working with S3 buckets in the Terminal easy. The installation is straightforward although for a Mac you might need to install a PGP tool. For a step by step installation see this great post. After finishing this you are ready to play with AWS S3 from your Mac.