S3 Static Website Hosting Basics Quiz Quiz

Assess your understanding of S3 static website hosting fundamentals, including configuration, permissions, URL formats, and error handling. This quiz is perfect for beginners interested in learning the essentials of hosting static websites using S3 buckets and related settings.

  1. Bucket Naming for Hosting

    When creating a bucket to host a static website, which naming convention is required for correct access using a custom domain such as 'example.com'?

    1. The bucket name should start with 'www'.
    2. The bucket name can contain spaces.
    3. The bucket name must exactly match the custom domain name.
    4. The bucket name must use all uppercase letters.

    Explanation: For static website hosting to work properly with a custom domain, the bucket name must exactly match the domain name you want to use. Starting with 'www' is not mandatory unless your domain does, uppercase letters are not allowed, and bucket names cannot contain spaces. Only the exact match enables correct routing to your site files.

  2. Index Document Role

    What is the purpose of specifying an 'index document' when setting up static website hosting with a bucket?

    1. It prevents users from uploading files to the bucket.
    2. It automatically creates subfolders for organizing files.
    3. It hides all other files in the bucket from public view.
    4. It serves as the default page loaded when users access the root URL.

    Explanation: The index document acts as the default landing page when a user visits the root website URL. It does not hide files, organize folders, or prevent uploads. The other options confuse access controls and storage organization, which are configured separately.

  3. Static Website Hosting Feature

    Which configuration must be enabled on a bucket to serve website files over HTTP in static website mode?

    1. Object Locking
    2. Lifecycle Management
    3. Static website hosting
    4. Versioning

    Explanation: Enabling static website hosting allows the bucket to serve files over HTTP with website endpoints. Versioning, Object Locking, and Lifecycle Management are unrelated to static website features; they manage file versions, object retentions, and automated deletion, respectively.

  4. Public Access Settings

    To make a static website publicly accessible, which setting must be correctly configured for the bucket?

    1. Cross-region replication
    2. Multi-factor authentication
    3. Server-side encryption
    4. Public read permissions

    Explanation: Public read permissions are required for users to view website files without authenticating. Encryption protects file content but doesn't affect accessibility, multi-factor authentication is for account security, and cross-region replication handles file backups, not access.

  5. Error Document Function

    In static website hosting, what is the primary purpose of specifying an 'error document' such as 'error.html'?

    1. It deletes corrupted files automatically.
    2. It speeds up file delivery by caching content.
    3. It displays a custom page when requested content cannot be found.
    4. It monitors site traffic and logs user activity.

    Explanation: The error document is shown when users try to access a non-existent file, providing a custom error message. It does not delete files, track users, or cache content. Caching and logging are handled elsewhere in the system.

  6. Accessing the Website

    After enabling static website hosting, how can you typically access the hosted site files?

    1. By connecting via SSH client to the bucket.
    2. By accessing through a custom mobile app only.
    3. By sending an email request for every file.
    4. By visiting the provided website endpoint URL in a web browser.

    Explanation: The correct access method is through the website endpoint URL, as it is designed for browser-based access. SSH and mobile apps are unrelated, and email is not a mechanism for serving website content. The distractors misrepresent standard web hosting practices.

  7. Supported Website Types

    Which type of website can be hosted using static website hosting on object storage buckets?

    1. A website containing only static files like HTML, CSS, JavaScript, and images.
    2. A site requiring database connectivity for content generation.
    3. A dynamic website using server-side processing like PHP or Python.
    4. A mobile application backend with real-time updates.

    Explanation: Static website hosting serves only files such as HTML, CSS, JavaScript, and images, without processing server-side scripts or databases. Dynamic websites, database-driven sites, and app backends require more advanced infrastructure not suitable for simple object storage hosting.

  8. Website Endpoint URL Format

    Which of the following best describes the general format of a static website hosting endpoint?

    1. A URL that requires user login credentials for access.
    2. A unique URL containing the bucket name and region with 'website' in the address.
    3. A direct IP address without any bucket or region indication.
    4. An address ending with '.exe' or '.bin' extensions.

    Explanation: The endpoint typically includes the bucket name and region, along with the word 'website' to indicate hosting status. File extension options are unrelated, IP addresses lack the necessary context, and requiring logins would prevent public access.

  9. Making Only Specific Files Public

    If you want only certain files to be publicly accessible on your static website, what should you configure?

    1. Enable object locking on all files.
    2. Set object-level public read permissions for those files only.
    3. Change the bucket name to a private value.
    4. Disable versioning for the bucket.

    Explanation: Applying public read permissions at the object level allows selective sharing of specific files, keeping others private. Changing the bucket name, enabling object locking, or disabling versioning do not manage visibility or access to website files.

  10. Updating Website Content

    What must you do to update the content of your static website hosted on an object storage bucket?

    1. Recreate the bucket every time you update.
    2. Restart the hosting server to publish changes.
    3. Upload new or modified files to the bucket.
    4. Contact support to schedule a manual refresh.

    Explanation: To update your static website, simply upload new or changed files to the bucket, and they become available immediately. There is no need to restart any server, contact support, or recreate the bucket. The distractors introduce unnecessary steps or misunderstand system behavior.