Freek Van der Herten wrote a follow-up tutorial to the one I posted yesterday about Uploading Files to S3
Freek demonstrates improving the upload process by using streams instead of file_get_contents which uses more memory. So if you want to upload large files consider the stream approach.
References: