Setting up Instant Websites on AWS for self hosting

Setting up your AWS environment

There are a couple of things you will need to do before Instant Websites is ready to publish to your AWS s3 bucket. Your AWS s3 bucket will need to be configured for static web hosting, and an account will need to be configured with the correct IAM policies. 

Configuring your S3 bucket for Instant Websites 

You will need to first create a bucket. Be sure to create your bucket name as per your desired domain name.

Example: If your domain is to be docs.acme.com, then your bucket name should be docs.acme.com

This is essential for securing your site with SSL.

Creating a bucket with the default settings should be fine. 


After creating your bucket, you will need to configure it for static website hosting:

  1. Navigate to S3 in the AWS Console.
  2. Click into your bucket.
  3. Click the Properties section.
  4. Click the Static website hosting option.
  5. Select Use this bucket to host a website.
  6. Enter index.html as the Index document page.
  7. Enter error.html as the error document page.

You will need to also configure your bucket with permissions required for public website access.

  1. Navigate to S3 in the AWS console.
  2. Select your bucket.
  3. Select Edit public access settings.
  4. Clear block all public access, and click save.

Configuring your AWS account for  Instant Websites

It is recommended to set up a new separate account and give that access to your s3 bucket. 

  1. Navigate to IAM in the AWS console.
  2. Select Users
  3. Select Add User
  4. Enter a User name and check Programmatic access, then click Next: Permissions
    Selecting Programmatic access ensures that AWS generates your API access keys. 
  5. As part of the account creation process, you will be required to add policy permissions. To run Instant Websites you will need to add certain permissions and access from your account to your s3 bucket. 
    1. If you are confident working with S3 buckets you can use the Attach existing policies directly option and add in the AmazonS3FullAccess policy, which will give your account ample access to your s3 bucket. 
    2. If your goal is to simply generate and upload your site to your s3 bucket, creating your own policy may be prudent and you will only require the following policy actions: 
      • PutObject
      • GetObject
      • DeleteObject
      • GetBucketPolicy
      • PutBucketPolicy
      • GetBucketWebsite
      • PutBucketWebsite
      • ListBucket
      • HeadBucket
  6. After attaching your policy, click Next: Review
  7. On the final step of the account creation process, ensuring you've selected programmatic access in Step 4your access key ID and secret access key should be displayed. Be sure to note down and save these values before navigating away from the page. They will be required for setting up your Instant Website connection.