Publish your Website
Learn how to publish your website on Amazon AWS.
1. Setup S3
When you created your website with Fixture, we already took all the steps necessary to take your website live. But, we wanted to take a second to review them, just so you have a complete understanding of what is going on. So, in review, here is what we did:
- Created a Public Read ACL. This makes your bucket public.
- Enabled the Static Website Hosting option and set the error page to error.html and the index to index.html.
- Setup a CORS parameter to let the Fixture app "PUT" to your bucket. This allows Fixture to upload files to your bucket.
- Created a bucket policy that makes any new objects added to it public.
2. Setup CloudFront
CloudFront is a world class CDN built to deploy your content to edge locations. This physically moves your site closer to your users. By doing this, it makes your site load really fast. To get started, navigate to CloudFront and select "Create Distribution". Start by creating a web distribution in CloudFront.
Specify the S3 origin for your bucket.
Setup HTTPS policy and specify a TTL for your files in the cache. The TTL is used to determine how often (in seconds) to refresh your distribution.
Select "Yes" for compressing objects. This enables GZIP compression on your website.
Specify the CNAME for your distribution. This should be the domain name of your site (mysite.com, www.mysite.com).
Create an SSL certificate for your domain and apply it to your distribution.
Specify index.html as the root object of the domain and click "Create Distribution".
3. Setup Route 53
Route 53 is Amazon's DNS service. From Route 53, you can purchase domains and map them to resources in AWS. To get started, navigate to Route 53 in your Amazon console and dreate a Hosted Zone for your domain.
Then for that hosted zone, create a Record Set. Specify it as an Alias and set it to the CloundFront Distribution you created in your previous step.
That is it. You should now have a super powered website powered by Fixture and Amazon AWS.