CORS in Amazon Simple Storage Service (S3)
Amazon Simple Storage Service (Amazon S3) provides developers and IT teams with secure, durable, highly-scalable object storage.
Scenarios for needing CORS in Amazon S3
You are hosting a website in an Amazon S3 bucket named website. Browsers load the website endpoint, . You want to use JavaScript on the web pages that are stored in this bucket to be able to make authenticated
GET
andPUT
requests against the same bucket by using Amazon S3's API endpoint for the bucket . The same origin policy in a browser would normally block JavaScript from allowing those requests, but with CORS you can configure your bucket to allow cross-origin requests fromwebsite.s3-website-us-east-1.amazonaws.com
(as the local domain) to the endpoint (as the target domain).You want to host a web font on your S3 bucket. Browsers require a CORS preflight check for loading web fonts, so you would configure the bucket that is hosting the web font to allow your web application...