This article is more than 1 year old
AWS adds some CORS blimey to S3
Web devs can now code drag and drop cloud storage uploads
Amazon Web Services (AWS) has added support for cross-origin resource sharing (CORS) to its simple storage service (S3), an inclusion that should get web developers a teensy bit excited because CORS lets a web page access resources from another domain.
The W3C, which tends CORS, explains its features thusly:
“If such an API is used on http://example.org resources, a resource on http://hello-world.example can opt in using the mechanism described by this specification (e.g., specifying Access-Control-Allow-Origin: http://example.org as response header), which would allow that resource to be fetched cross-origin from http://example.org.”
AWS’ imagined applications for CORS would see developers use JavaScript and HTML5 to implement things like drag and drop uploads to Amazon S3, progress bars for uploads or the chance to update content in S3 buckets from within web apps. AWS also says CORS and S3, working together, could mean “External web pages, style sheets, and HTML5 applications hosted in different domains can now reference assets such as web fonts and images stored in an S3 bucket, enabling you to share these assets across multiple web sites.”
CORS isn’t switched on by default: AWS users will need to enable it on a bucket-by-bucket basis.
The inclusion of CORS will doubtless make S3 more attractive to all manner of developers, as by making it easy to arrange uploads into one of the world’s more reputable, reliable and cheaper cloud storage services web apps won’t be tied to local storage.
Backup services companies may also enjoy the new tool. While several use S3 for data storage, and many S3 clients are available to those who would use the service as a backup tool, few are user-friendly. The addition of CORS may therefore get developers excited about the chance to build more approachable cloud storage tools as web apps. ®