AWS Certified Developer – Associate — Question 232

A company hosts a client-side web application for one of its subsidiaries on Amazon S3. The web application can be accessed through Amazon CloudFront from https://www.example.com. After a successful rollout, the company wants to host three more client-side web applications for its remaining subsidiaries on three separate S3 buckets.

To achieve this goal, a developer moves all the common JavaScript files and web fonts to a central S3 bucket that serves the web applications. However, during testing, the developer notices that the browser blocks the JavaScript files and web fonts.

What should the developer do to prevent the browser from blocking the JavaScript files and web fonts?

Answer options

Correct answer: C

Explanation

The correct answer is C because a CORS configuration is specifically designed to handle cross-origin requests, allowing the web applications to access resources from the central S3 bucket without being blocked by the browser. Options A and B do not address the cross-origin issue, and option D is unrelated to CORS and does not resolve the problem of resource blocking.