amazon S3 upload example and fixed #334