working uploadToS3