Courseiva
Question 1,595 of 724
Development with AWS ServiceshardMultiple ChoiceObjective-mapped

DVA-C02 Development with AWS Services Practice Question

A developer is optimizing an S3 bucket for static website hosting. The site has a main page (index.html) and an error page (error.html). Users report seeing a generic 403 error instead of the error page when accessing a missing object. What is the likely cause?

⚠ Common exam trap

A common mix-up: candidates confuse a permission issue (like a bucket policy or object ACL) with a configuration issue, assuming a 403 error always means 'access denied' rather than a missing Error Document setting.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The Error document field in the static website hosting configuration is not set to error.html.

When static website hosting is enabled on an S3 bucket, the Error Document field specifies the object served when a 403 or 404 error occurs. If this field is not set to error.html, S3 returns its generic 403 error response instead of the custom error page. The correct answer is B because the Error document configuration is missing or incorrect.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The bucket policy denies access to the error.html object.

    Why it's wrong here

    While a bucket policy can indeed deny access to specific objects, resulting in a 403 Forbidden error, this option is incorrect because the primary issue described is the failure to display a *custom* error page. If the bucket policy explicitly denied access to `error.html`, S3 would return a generic 403 error, not necessarily indicate a problem with the static website hosting configuration's ability to route to a custom error document. The question implies the custom error page mechanism itself is not functioning as expected, which points to configuration rather than a direct access denial.

  • The Error document field in the static website hosting configuration is not set to error.html.

    Why this is correct

    This is the correct answer because the 'Error document' field within the S3 static website hosting configuration explicitly tells S3 which HTML file to serve when a 4xx error occurs. Without this field being correctly set to `error.html`, S3 will not know to redirect error requests to your custom page, even if `error.html` exists and has appropriate permissions. This configuration acts as the crucial routing instruction for custom error handling, ensuring a branded user experience during errors.

  • The index.html is missing from the bucket.

    Why it's wrong here

    This option is incorrect because the absence of `index.html` would typically result in an HTTP 404 Not Found error when a user attempts to access the root URL or a directory without a specified index document. A 403 Forbidden error, which is often the context for issues with custom error pages not displaying, indicates a permissions problem or an explicit denial of access, not that the requested resource itself is missing from the bucket. The type of error (403 vs. 404) is distinct.

  • The error.html object has incorrect permissions.

    Why it's wrong here

    Although `error.html` must ultimately be accessible for S3 to serve it (typically via a public read bucket policy), incorrect individual object permissions are not the most direct cause for the *custom error page not being displayed* by the static website hosting feature. If permissions were the sole issue, S3 would likely return a generic 403 Forbidden error, indicating a direct access problem. The failure of the custom error page mechanism to even attempt to route to `error.html` points more strongly to a missing or incorrect configuration in the static website hosting settings, rather than just the object's permissions.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jul 4, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.