added S3 upload functionality