Exam DVA-C02 All QuestionsBrowse all questions from this exam
Question 28

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?

    Correct Answer: C

    When a web application needs to access resources such as JavaScript files and web fonts that are hosted on a different domain (in this case, a central S3 bucket) than the application itself, the browser's same-origin policy will block these requests by default. To prevent this, you need to set up a cross-origin resource sharing (CORS) configuration on the S3 bucket that hosts the shared resources. This configuration specifies which domains are permitted to access the resources, thus allowing the browser to make cross-origin requests without blocking them.

Discussion
UntamablesOption: C

C This is a frequent trouble. Web applications cannot access the resources in other domains by default, except some exceptions. You must configure CORS on the resources to be accessed. https://docs.aws.amazon.com/AmazonS3/latest/userguide/cors.html

svrnvtrOption: C

It is C

aragon_saa

C https://www.examtopics.com/discussions/amazon/view/88856-exam-aws-certified-developer-associate-topic-1-question-302/

tomchandler077

C The question described is a classic case of Cross-Origin Resource Sharing (CORS) where the browser blocks resources (like JavaScript files and web fonts) that are loaded from a different origin (the central S3 bucket) than the web application. To resolve this, a CORS configuration needs to be added to the central S3 bucket to allow these resources to be accessed from the different origins of the web applications.

65703c1Option: C

C is the correct answer.

badsatiOption: C

The answer is C for cat