Brad Lucas

Programming, Clojure and other interests

Cname To S3 Bucket

August 10, 2017

The url you get for a S3 hosted web site is a bit long. You might want to set up a subdomain from your domain that points to your S3 hosted site. The trick to do this involves how you name your bucket.

Here is an example.

Suppose your domain is and you want to setup a subdomain which points to a S3 hosted website.

To make this work the key is to create a bucket called This will give you a endpoint of

Continue reading →

Redirect From S3 Website

August 9, 2017

So after setting up a few S3 hosted sites what happens if you want to move your site to another place. Say, you want to host the site over on an EC2 instance but you've already handed out the long url to your S3 bucket. It may be useful to have a redirect setup on the S3 bucket. Here is how to set that up.

Step 1

Remove all your files except for the index.html. Then edit the index.html and remove all of it's content except the most basic of html. This is just so you don't have anything left of your site in the bucket.

Step 2

Continue reading →

S3 Website Hosting

August 8, 2017

You can host a static web site simply using a S3 bucket. To do so create your bucket and select it in the AWS console.


Select properties tab and then click on the 'Static website hosting' box. When prompted note the end point as this will be the url to your site. Then select 'Use this bucket to host a website'. Enter the appropriate index document. Typically, it will be index.html but if you have a different default page enter it here and save the prompt.


Continue reading →

Emacs And Solidity

August 7, 2017

After working with Solidity for a while and using javascript-mode it finally dawned on me to look for a Solidity mode and viola one exists.

Try package-list in Emacs and look for `solidity-mode'

solidity-mode      20170712.1442 installed             Major mode for ethereum's solidity language

If you don't see it you will need to point to MELPA so package.el can find it. See the repo link below for more details.

Continue reading →

Creating a private Ethereum testnet

August 6, 2017

Working against a local private testnet is very useful when you are developing your own smart contracts for Ethereum. It is faster and you don't have to worry about ether and having enough for gas.


One of the simplest methods to run a local testnet is to install testrpc. When done just run the command testrpcs and you'll have a local node with accounts running for you to excercise your code against.

Continue reading →