Static Websites: Discount Hosting in the Cloud

Broadly speaking, when it comes to communicating on the web, there are static websites and dynamic websites.

A static website is one whose pages are stored on a server in the exact format that is sent to a client web browser. It is primarily coded in HTML. (For more details, you might like to take this Cloud Academy course on static website hosting.)

A dynamic website is one that changes or can be designed to be customized on the fly. Dynamic sites can be built using programming languages like PHP, Perl, Python, and Ruby.

In this first post, I’ll provide an example of how to set up a very simple static website, and show how surprisingly cheap it can be to host a static website on Amazon’s S3. Part two of this blog series will focus on the more complicated, demanding (and costly) dynamic websites.

Hosting a static website on AWS

  • The first thing that you will need to do is create an index.html file to use are your site’s main page. Let’s try this.
<HTML>
<HEAD>
<TITLE>
Cloud Academy static website example
</TITLE>
</HEAD>
<BODY>
<H1>Hi</H1>
<P>Cloud Academy is awesome!</P>
</BODY>
</HTML>
  • Now, using S3, I’ll create a bucket called cloudacademyblog and upload our index.html file to it. If you’re not sure how to do that, read Uploading Objects into Amazon S3 in the Amazon Simple Storage Service Console User Guide.
  • While viewing our bucket’s Static Website Hosting properties within the AWS S3 console, we’ll need to
    – enable website hosting
    – note our endpoint (mine is cloudacademyblog.s3-website-us-east-1.amazonaws.com) which will be our website address
    – set index.html as the Index Document as shown below
Static Website: Enabling website hosting
  • Also in Properties, under permissions, you’ll need to “add a bucket policy” like the one below (replacing your bucket name for cloudacademyblog is in this example):
{
    "Statement":[{
	"Sid":"PublicReadForGetBucketObjects",
        "Effect":"Allow",
	  "Principal": "*",
      "Action":["s3:GetObject"],
      "Resource":["arn:aws:s3:::cloudacademyblog/*"
      ]
    }
  ]
}

That’s it. Very simple. Very quick.

Let’s now check out our new website by going to cloudacademyblog.s3-website-us-east-1.amazonaws.com.

Here’s what we see:
Static website: Example
Not the greatest website ever built but certainly up there with the cheapest. You can, of course, add new pages, links, and images, but keep in mind that you should stick to HTML – as this is a static website. If your site requires fancy PHP (a WordPress, site, for example) you’ll need to come up with another solution. Or just read part two of this post.

Static websites: how much do they cost?

If you were to leave it at that and not worry about changing the domain name to something a little more user-friendly, then this site is virtually free. If you keep adding content – especially videos and image files, your costs are still going to be reasonably well contained as there are no set-up fees or commitments to begin using the service and you only pay for what you use.

Going static offers some terrific advantages:

  • A fast and efficient way to deliver content.
  • Does not require any code or backend databases, which can make content delivery more secure.
  • Uses simple, clean URLs for addresses.
  • Takes advantage of web caching systems, further boosting performance.
  • Is compatible with every type of web server technology.

But let’s not forget the disadvantages:

  • You won’t be able to incorporate any interactive functionality or e-commerce tools.
  • There’s no way to use popular CMS systems like WordPress.

One of the best things about AWS is that you can play around as much as you want and as long as you take some reasonable precautions you can’t get yourself into too much trouble. So what are you waiting for? Grab yourself an AWS account if you haven’t already got one and build yourself a static website.

Look out for part two of this article when I will take you through the cheapest option on setting up a dynamic website on AWS.

Avatar

Written by

Michael Sheehy

I have been UNIX/Linux System Administrator for the past 15 years and am slowly moving those skills into the AWS Cloud arena. I am passionate about AWS and Cloud Technologies and the exciting future that it promises to bring.

Related Posts

Joe Nemer
Joe Nemer
— September 12, 2019

Real-Time Application Monitoring with Amazon Kinesis

Amazon Kinesis is a real-time data streaming service that makes it easy to collect, process, and analyze data so you can get quick insights and react as fast as possible to new information.  With Amazon Kinesis you can ingest real-time data such as application logs, website clickstre...

Read more
  • amazon kinesis
  • AWS
  • Stream Analytics
  • Streaming data
Avatar
Alex Casalboni
— September 3, 2019

Google Vision vs. Amazon Rekognition: A Vendor-Neutral Comparison

Google Cloud Vision and Amazon Rekognition offer a broad spectrum of solutions, some of which are comparable in terms of functional details, quality, performance, and costs. This post is a fact-based comparative analysis on Google Vision vs. Amazon Rekognition and will focus on the tech...

Read more
  • Amazon Rekognition
  • AWS
  • Google Cloud Platform
  • Google Vision
Alisha Reyes
Alisha Reyes
— August 30, 2019

New on Cloud Academy: CISSP, AWS, Azure, & DevOps Labs, Python for Beginners, and more…

As Hurricane Dorian intensifies, it looks like Floridians across the entire state might have to hunker down for another big one. If you've gone through a hurricane, you know that preparing for one is no joke. You'll need a survival kit with plenty of water, flashlights, batteries, and n...

Read more
  • AWS
  • Azure
  • Google Cloud Platform
  • New content
  • Product Feature
  • Python programming
Joe Nemer
Joe Nemer
— August 27, 2019

Amazon Route 53: Why You Should Consider DNS Migration

What Amazon Route 53 brings to the DNS table Amazon Route 53 is a highly available and scalable Domain Name System (DNS) service offered by AWS. It is named by the TCP or UDP port 53, which is where DNS server requests are addressed. Like any DNS service, Route 53 handles domain regist...

Read more
  • Amazon
  • AWS
  • Cloud Migration
  • DNS
  • Route 53
Alisha Reyes
Alisha Reyes
— August 22, 2019

How to Unlock Complimentary Access to Cloud Academy

Are you looking to get trained or certified on AWS, Azure, Google Cloud Platform, DevOps, Cloud Security, Python, Java, or another technical skill? Then you'll want to mark your calendars for August 23, 2019. Starting Friday at 12:00 a.m. PDT (3:00 a.m. EDT), Cloud Academy is offering c...

Read more
  • AWS
  • Azure
  • cloud academy content
  • complimentary access
  • GCP
  • on the house
Avatar
Michael Sheehy
— August 19, 2019

What Exactly Is a Cloud Architect and How Do You Become One?

One of the buzzwords surrounding the cloud that I'm sure you've heard is "Cloud Architect." In this article, I will outline my understanding of what a cloud architect does and I'll analyze the skills and certifications necessary to become one. I will also list some of the types of jobs ...

Read more
  • AWS
  • Cloud Computing
Avatar
Nitheesh Poojary
— August 19, 2019

Boto: Using Python to Automate AWS Services

Boto allows you to write scripts to automate things like starting AWS EC2 instances Boto is a Python package that provides programmatic connectivity to Amazon Web Services (AWS). AWS offers a range of services for dynamically scaling servers including the core compute service, Elastic...

Read more
  • Automated AWS Services
  • AWS
  • Boto
  • Python
Avatar
Andrew Larkin
— August 13, 2019

Content Roadmap: AZ-500, ITIL 4, MS-100, Google Cloud Associate Engineer, and More

Last month, Cloud Academy joined forces with QA, the UK’s largest B2B skills provider, and it put us in an excellent position to solve a massive skills gap problem. As a result of this collaboration, you will see our training library grow with additions from QA’s massive catalog of 500+...

Read more
  • AWS
  • Azure
  • content roadmap
  • Google Cloud Platform
Avatar
Adam Hawkins
— August 9, 2019

DevSecOps: How to Secure DevOps Environments

Security has been a friction point when discussing DevOps. This stems from the assumption that DevOps teams move too fast to handle security concerns. This makes sense if Information Security (InfoSec) is separate from the DevOps value stream, or if development velocity exceeds the band...

Read more
  • AWS
  • cloud security
  • DevOps
  • DevSecOps
  • Security
Avatar
Stefano Giacone
— August 8, 2019

Test Your Cloud Knowledge on AWS, Azure, or Google Cloud Platform

Cloud skills are in demand | In today's digital era, employers are constantly seeking skilled professionals with working knowledge of AWS, Azure, and Google Cloud Platform. According to the 2019 Trends in Cloud Transformation report by 451 Research: Business and IT transformations re...

Read more
  • AWS
  • Cloud skills
  • Google Cloud
  • Microsoft Azure
Avatar
Andrew Larkin
— August 7, 2019

Disadvantages of Cloud Computing

If you want to deliver digital services of any kind, you’ll need to estimate all types of resources, not the least of which are CPU, memory, storage, and network connectivity. Which resources you choose for your delivery —  cloud-based or local — is up to you. But you’ll definitely want...

Read more
  • AWS
  • Azure
  • Cloud Computing
  • Google Cloud Platform
Joe Nemer
Joe Nemer
— August 6, 2019

Google Cloud vs AWS: A Comparison (or can they be compared?)

The "Google Cloud vs AWS" argument used to be a common discussion among our members, but is this still really a thing? You may already know that there are three major players in the public cloud platforms arena: Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP)...

Read more
  • AWS
  • Google Cloud Platform
  • Kubernetes