# Create Static Web in S3

This document explains how to create a static website in S3, the static Web Hosting feature allows you to host your static website on Deka Box. Follow these steps to create your static website in Deka Box.

* We need to create an index document for your static web and upload it. Index documents are web pages, which are referred to as default pages.
* Create an index.html file. if you don't have an index.html file, you can use the following HTML to create one:

```
<!doctype html>
<html>
  <head>
     <title>This is the title of the webpage!</title>
  </head>
  <body>
     <p>This is an example paragraph. Anything in the <strong>body</strong> tag will appear on the page, just like this <strong>p</strong> tag and its contents.</p>
  </body>
</html>

```

Save the index file locally.

* Upload your index.html file to your bucket. After that, we need to configure the bucket policy to allow anonymous static web access. Open S3 Browser on your computer.

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXf1dcP15qN_QR11dnaLgPzTVT293xXDCv-QLJJeiszVdyTcxFg_cylS7xTk-klRi7GfyZBu7yi-djkrbg0m94suT-jfnA6TmT7Kt5s8ZPGMZJ6VRjuolLduq3mXaferJWjnyvFB0xBY9yeg1nnJrBkF1b2V?key=eSucCgatcev0YHFI_1aohA" alt=""><figcaption></figcaption></figure>

* In S3 Browser, click Buckets, then select Edit Bucket Policy. We need to allow anonymous to access the static web.

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXdRBclycQVSwtGZCe-rzJSNBurTHsBZCrzF717aPpJ6ozMT2tkwY40sgO97qjjipsX4xkXnaBQxlQbA6pJH4MoDYJfypBRkKO4hbGt9al8Hi5jrbwHWub2SeP2149igFMYH9oz09p85LkDmDYi7LIdqx9in?key=eSucCgatcev0YHFI_1aohA" alt=""><figcaption></figcaption></figure>

* In the Bucket Policy Editor, create a policy syntax like the following example.

```
{ 
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": "*",
      "Action": [
        "s3:GetObject",
        "s3:ListBucket"
      ],
      "Resource": [
        "urn:sgws:s3:::bucket-ubuntu",
        "urn:sgws:s3:::bucket-ubuntu/*"
      ]
    }
  ]
}
```

{% hint style="warning" %}
Customize ubuntu-bucket with your bucket name.
{% endhint %}

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXffZ9DFIUM2BWNJFwbJfwhtphRz4fsNeLE_M5TiJXc--xcfNiKI_68BDsDdxUvBMzmZZUXxSOoVcgKrW5n2jkKv-ERF0S_LNw1yQWq0SbVqk455xxP6LEpUakZhlkKGQBFxbJZDzEDIcYeE15e8DOWc3nfD?key=eSucCgatcev0YHFI_1aohA" alt=""><figcaption></figcaption></figure>

* Test your static web access using a URL, as an example&#x20;

```
https://bucket.cloud.lintasarta.co.id:8082/bukcket-ubuntu/index.html
```

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXdTPIwu3w3KjI0IqCHQemtDhPvhNk-g3axzGB86pP2BLhl86ifnj7LhulwQ9xxbxAast9v7GbDxl38x3ckZ2J6a5R6zbWf3vFmHNel_vBYDHSxFdJ3Zll1kHrmB7Zlw13QxGV1TqWUMTbopQB5J85I9j_kU?key=eSucCgatcev0YHFI_1aohA" alt=""><figcaption></figcaption></figure>

* Now the bucket hosts your static web.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloudeka.ai/deka-box/create-static-web-in-s3.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
