Deploying a Static Website on AWS

Let’s start off with a hypothetical- you’ve got a simple static website for a small project, and you want to host it online. What’s the best way? You can score different methods on a variety of categories:

  • Cost
  • Scalability
  • Simplicity

For the majority of use cases, the best way to do this is going to be to use Amazon S3 to host your content. Why?

Simplicity

As I’ll show you, deploying a static website via S3 is as easy as can be.

Cost of Hosting

https://aws.amazon.com/getting-started/projects/host-static-website/
https://aws.amazon.com/free/

Scalability

Before jumping in- I want to clarify what I mean when I say a static website. A static website is a collection of HTML files and whatever resources you need to make it pretty or to add functionality. A basic static website directory looks something like this:

1
2
3
4
5
6
- css/
|- styles.css
- js/
|- scripts.js
- index.html
- error.html

Amazon S3 makes hosting something like this dead simple. Create an S3 Bucket using the default settings. Once created, go to the ‘Properties’ tab for the bucket, and click ‘Static Website Hosting’. Select the ‘Use this bucket to host a website’ radio button, and declare and index and error document, which should match up with your site structure.

Building a Smart Boat

Last year, we bought a boat. She’s old, and she’s slow, but she floats and sails and that’s pretty cool. There’s not much to ole Mariah, but the guy that sold her to us included a solar panel to charge cell phones and power a small lamp, and that idea of owning something and making it your own to solve a problem put a little tickle in the back of my head. I knew that I wanted to make this boat my own, but I wasn’t sure how.

I think most people would take an old boat and gut the interior, give her some fresh varnish, or do some other cosmetic project. Mariah needs all of that, but I wanted to do something that I hadn’t seen anyone else do before. I was going to give her a brain.

Read More

Control a Raspberry Pi with Node.js

In the last few years, I’ve ended up with a Raspberry Pi, Arduino, and a handful of LEDs and other gizmos that have been sitting in a box under my desk. All of the new AWS IoT announcements piqued my curiosity again, and I finally found the time to sit down and play with my toys. I wanted to put my web dev knowledge to work, so I figured I’d learn to control the Raspberry Pi with Node.js.

Read More