0 votes
in AWS by

A static web site has been hosted on a bucket and is now being accessed by users. One of the web pages javascript section has been changed to access data hosted in another S3 bucket. Now that same web page is no longer loading in the browser.

Which of the following can help alleviate the error?

1 Answer

0 votes
by

Answer - C.

This is given as use case scenarios in the AWS Documentation.

Cross-Origin Resource Sharing: Use-case Scenarios.

The following are example scenarios for using CORS.

Scenario 1: Suppose you are hosting a website in an Amazon S3 bucket named website described in Hosting a Static Website on Amazon S3

Your users load the website endpoint http://website.s3-website-us-east-1.amazonaws.com.

Now you want to use JavaScript on the webpages stored in this bucket to make authenticated GET and PUT requests against the same bucket by using the Amazon S3 API endpoint for the bucket website.s3.amazonaws.com.

A browser would normally block JavaScript from allowing those requests, but with CORS, you can configure your bucket to enable cross-origin requests from website.s3-website-us-east-1.amazonaws.com explicitly.

Scenario 2: Suppose that you want to host a web font from your S3 bucket.

Related questions

0 votes
asked Apr 17 in AWS by DavidAnderson
0 votes
asked Apr 22 in AWS by DavidAnderson
...