McNutty, my domainest man

This article is part 4 in a series on aws. If this is your bag, check out

  • Part 1: In which our hero finally pays the price for his flippant 'disk space is free bruh' mentality
  • Part 2: In which our hero bestows Jupyter upon us all
  • Part 3: In which our hero decyphers
  • Part 4: In which our hero clicks all the buttons

assigning a namespace to my safe space

the following is based entirely on this page and this page

A long time ago in a galaxy right next to my balcony, I decided it would be a good idea to snap up a bajillion domains – you know, for when I’m famous and they’re hard to get. unfortunately lamberty.com was unavailable (com’on internet!), so I had to settle for a handful of other options. One that I did grab that I am perfectly happy with is lamberty.io. That’s fancy, right? all the internets are doing it. we have the best cyber.

In any case, after sitting on several such domains at cost for at least a year, I got an idea – let’s do something with them. And then I got a second idea – let’s make it, like, a shitty webpage. so that’s what I’m doing. putting a shitty webpage on a shitty aws ec2 instance and advertising to you, my people, my loving masses, to go hammer the hell out of it so that my aws bill shoots through the roof. fly, my pretties.

prerequisites

pretty straight forward here:

  • a domain
  • an aws ec2 instance
  • an aws s3 bucket
  • a shitty webpage

On the fourth item above, the following will more than suffice

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>2 legit 2 quit</title>
    </head>
    <body>
        <h1>hello world</h1>
        <p>is so cliche</p>
    </body>
</html>

beyond that, there’s not really anything else to do. We have two basic stages:

  1. create a static webpage using the s3 hosting mechanism outlined in this page
  2. create some DNS records linking to that static page from the base domain address as outline on this page

wrapup

This hasn’t been so much a walkthrough as a confession. I did a bunch of things people told me to do. One thing that I’d like to figure out in the future: this method clearly supports sub-domain tagging (I was able to do this quite successfully with a subdomain I now use in my ssh configuration, for example) – can we also use it to handle routes within a domain? what if I want to have a static landing page, say, but a web app running at www.mydomain.rules/webapp/? could I simply create a dns entry pointing to a different server? or is the general process there to build in redirects from the s3 bucket to the app running on some port on some server? or do I need to get into routing with a bona fide web server?

The world may never know.

Written on July 3, 2017
Keywords: aws, linux, admin, sysad, dns, namecheap, domain, internet, routing