The code below will walk you through the process to get a working example created for uploading an image file to your Amazon S3 Server. You should already have a bucket created and have your key and secret on hand. We will add those strings to a config file. Once your done you will be able to upload an image file to your Amazon S3 server and verify the image was uploaded by refreshing your S3 Admin portal or view the image from your returned code.
Get the code from Github : https://github.com/wesleyduff/AmazonS3FileUpload