I'm trying to write a JavaScript browser application, and it needs to run in IE 11. I'd like to use the Promises feature of the AWS SDK, but IE does not natively support promises.
It looks like Bluebird will do this, but I'm not sure how to get AWS to use it in a browser. The recommended approach from AWS:
<script src="vendorScripts/bluebird.min.js.css"></script>
<script src="vendorScripts/aws-sdk-2.192.0.min.js"></script>
... load a few other scripts...
<script>
AWS.config.setPromisesDependency( require('bluebird'));
</script>
Fails with this error: Uncaught ReferenceError: require is not defined
If not already, you need to configure it to use an external promise library. Note the part:
In the browser, a library that implements promises and provides a global Promise namespace, (bluebird) should be loaded before the AWS SDK is loaded. The AWS SDK will then find the namespace and use it internally.
// AWS SDK was loaded after bluebird, set promise dependency
AWS.config.setPromisesDependency(Promise);
Here is a Fiddle. I tried it in Chrome 64, and IE 11, without seeing an error.
When configured, it should support IE +10. I also found this AWS SDK Builder interesting when researching this.