The Hack Win #2

Like a few months ago, there was a Hackathon at Carfax yesterday and today. And like a few months ago, I won the same award: Best Productivity Boost award.

I didn't think I was going to be doing anything leading up to this, but my work with the Platform team was finishing up, and I had spare time. I was initially going to make a UI to show off the API, but the API wasn't quite ready yet. So I ended up just focusing on the build/deploy aspect of that UI and making that as smooth as possible.

I've made a dozen apps in my life using a very similar process in AWS: compile files to static assets, store them in S3, and serve them up via CloudFront. When new features come along, it's super easy to clear out the S3 directory with new assets and invalidate the cache. Within a minute you can have your updated site.

While this works well for my personal projects, it works less ideally for Carfax projects. The reason is twofold; you cannot use the simple S3 Website config for security reasons, and you don't have any sense of versioning. Versioning is essential because inevitably, a developer will deploy something with mistakes, and it will need to be reverted to its previous state as soon as possible. I built the infrastructure and CLI tool to address these problems.

My new pipeline involves compiling the files to static assets like before, but I instead store them strategically in S3, prefixing them with a version -- a timestamp. This version is essentially a pointer to the "folder" where all of your assets are in that S3 bucket, and I stored it in SSM.

Next, some additional infrastructure is required: a Lambda at Edge function that runs on an origin request from CloudFront to S3. This function grabs the version from SSM and prefixes all requests going to the origin with that version.

When a new version is built and uploaded to S3, my custom CLI tool allows one to change the version parameter in SSM easily. Once a version is changed, the CloudFront distribution is invalidated, and new requests will immediately start pulling the new content and caching that. If a rollback is necessary, you can use the CLI tool again to switch the pointer and invalidate CloudFront. That takes under 10 seconds.

Anyway, that's what I demoed. It went great, and I won an award and a $50 Amazon gift card, again.


The podcast documenting the creation of a TV show with Caleb is going well. It's a lot of fun, and I look forward to it every time. Nothing we're making is available yet and probably won't be for a long while, if ever.

One thing we wanted to change about the format is the option to involve more people. My current setup only has room for two microphones, but I just made a bunch of purchases last night that's going to allow us to record up to 4 people because we want to have guests come on and tell stories.

When ordering equipment, I've learned to not only order the things I need but cases to keep them safe in addition to larger bags to keep everything together and easily transportable. It increases the cost a bit, but it's crucial in making a pleasant experience of doing the setup and podcast. If it were a hassle every time, I would be more inclined to give it up or not take certain risks.


Now that I'm halfway through the year, I'm going to reevaluate some of my goals soon and make some changes most likely. The interviewing goal specifically is something I'm struggling with, and I'm not enjoying the challenge. Regardless of my final decision, probably in the next week or two, I won't totally "give up" a goal but replace it with another one instead. We'll see.