amazon S3 upload example
fix #335 and #331
fix #335 and #331