How To Create A Static Website In AWS Cloud

AWS-Hosting-Static-Website

Did you know you can host a static website on Amazon S3? A better question is why should you use AWS to host a static site?

  • You can use CMS and other development platform support.
  • There are data centers worldwide. Your customers can be anywhere.
  • Dynamically grow and shrink resources. AWS can scale based on your organization needs.
  • Flexible pricing models. AWS only charges you for the resources you use.

Now, that you’re curious and want to give it a try. Let’s get started.

Login to your AWS Console. If you don’t have an existing an account get started with an AWS Free Tier account.

Create a new S3 bucket to host your website.

AWS Console > Services > S3 > +Create bucket

I’m naming my bucket mys3websitemiramesa. Keep the default for properties and permissions.

Screen Shot 2017-08-23 at 2.42.44 PM

Click on your new bucket and go to the properties tab. Enable Static website hosting

Screen Shot 2017-08-23 at 2.44.21 PM

Select the option to User this bucket to host a website

Screen Shot 2017-08-23 at 2.46.29 PM

Next, we’re going to create an index.html and error.html and upload to your bucket.

Code resources for index.html and error.html 

Screen Shot 2017-08-23 at 3.06.55 PM

Go to the permissions tab then Public access and allow everyone to read.

Screen Shot 2017-08-23 at 3.36.51 PM

In the mys3websitemiramesa properties > Static Website  you can find your link to view your site. Copy and paste the endpoint link into a browser.

endpt

You will see your website.

Screen Shot 2017-08-23 at 3.36.11 PM

If you change permissions for your index.html page to disable users to read then click on your endpoint link again. You will see your error.html page.

Screen Shot 2017-08-23 at 3.43.04 PM

 

The great thing about hosting a static website on AWS is that AWS will scale for you. It can handle any load with hundreds or thousands of users.

You’ll probably wonder how much is this going to cost? Well, that depends. If you are using the AWS Free Tier and within the limits, it will cost you around $.50 a month. If you’re outside of the free tier it will cost around $1-3 a month. For a breakdown of cost using the Simply Monthly Calculator here.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s