Object storage – Website

Functionality overview

The Website functionality allows to expose publicly a bucket as a static website.


A static website only delivers unmodified content, ie. as it is stored.

Typically HTML, CSS and image files or even client-side scripts.


Typical use case: publish a set of documentation.

Access

When Website is enabled for a bucket, the bucket is available as a website with the following endpoint URL:

https://bucket-name.website-region01.cloudavenue.orange-business.com

(replace bucket-name with real value)


The access is strictly read-only and available worldwide.

Configuration steps

  1. create a bucket
  2. enable website
  3. allow public-read on all objects
  4. upload content

Use case with AWS CLI

(replace bucket-name with real value)

Prerequisite : prepare content

Even if you want to publish individual objects, enabling Website will require an index document.

An index document is a webpage that is returned when nothing specific is requested (sort of a default page).


Request https://bucket-name.website-region01.cloudavenue.orange-business.com and the configured index document will be returned (if the object was uploaded before).


Describing the creation of a entire static website is out of scope here.

Let’s focus on the minimum requirement, ie. the index document.


Create an index.html file with the following content :

Create a bucket

Enable website for the bucket

Here, object index.html is configured as index document.

Add a bucket policy to allow public read

Create an AllowGetForAllPolicy.json file with the following content :

Apply the policy to the bucket :

Upload content to the bucket