Setting up Instant Websites on AWS for self-hosting
If you would like to use your own S3 bucket for Instant Websites you will first need to set up your AWS Account with the correct IAM Policies.
Configuring your AWS account for Instant Websites
It is recommended to set up a new separate account on AWS for your Instant Websites publishing.
Navigate to IAM in the AWS console.
Select Users
Select Add User
Enter a User name and check Programmatic access. Selecting Programmatic access ensures that AWS generates your API access keys.
Click Next: Permissions
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.
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.
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
After attaching your policy, click Next: Review
On the final step of the account creation process, ensuring you've selected programmatic access in Step 4, your access key ID and secret access key should be displayed.
Important!
Be sure to note down and save your Access Key ID and Secret Access Key values before navigating away from the page.
They will be required for setting up your Instant Website connection.
Using your AWS Account and S3 bucket with Instant Websites
Once your account and IAM policy is in place, it's time to create your Instant Website with your copied Access Key ID and Secret Access Key.
Navigate to the space you want to publish and then to Space Settings → Integrations → Instant Websites
Enter your desired hostname e.g.: docs.acme.com
Select Host yourself
Enter your AWS API Key (Access Key ID) and AWS API Secret (Secret Access Key). These values provided when you create your AWS Account and set your permissions. See above.
Select Create your instant website
Your space contents will be automatically published to your space which you will be able to view from your browser of choice.