Unless I'm missing something, this library doesn't support temporary credentials. You can follow how to do it here: https://stackoverflow.com/questions/18884683/browser-uploads-to-s3-with-instance-roles