A majority of the sites we develop at Rapid Development Group require a hosting environment that is robust enough to minimally handle a database, and several concurrent“workers” executing code and delivering pages to the client. But occasionally a client needs a small site, that doesn’t execute any code, and just delivers static markup to the client. Using an application stack in this situation is beyond overkill. Perhaps the most popular alternative for deploying a simple static website that loads fast, and costs very little is Amazon’s AWS s3 service. One of the very few barriers to taking this approach, is configuring AWS s3(a service for simple file storage) to act as a web server. Amazon does provide resources for getting us there, but it’s far from a one click install.
For the purposes of this article, let’s assume you have your static site assembled and ready to deploy. We are also skipping the actual AWS account creation process.
This will issue a warning message that you have allowed“public access” which is fine.
At this point, you can place the files in your site’s bucket either via the s3 console, or your method of choice.
You can visit your site using the URL provided under Properties → Static Website Hosting.
In order for your custom domain name to resolve to this location, a CNAME record will need to be created with your registrar. A subdomain will be required to use this approach(ie. www.example-rdg.com). Setting up a root domain requires extra configuration.
And if you want to secure your site with a certificate you will need to set up AWS Cloudfront. I have created a separate article for configuring this service.
About the Author
Was that a good read? Here are some articles with similar topics!