« Back to home

Exploring VPC Networking in AWS

This is a tutorial for a class I’m teaching right now.

Amazon’s documentation of Virtual Private Clouds (VPC) is excellent. It is in-depth, and covers many use cases. It’s too complicated for the class I’m teaching though.

This tutorial will cover the topic of creating Internet-accessible and non-Internet-accessible EC2 instances within the same VPC, by hand within the AWS Console. At the end we’ll have one Internet-accessible Linux box which will be able to talk to a second, non-Internet-accessible Linux box. The instances will be accessible on ports 22 and 4000 from anywhere.

Read more »

AWS Lambda Function URL Hello World

The ability to create a URL to AWS Lambda functions has existed for a long time - but has never been as easy as it is today. In April AWS announced Lambda Function URLs, and now adding a world-usable non-authenticated URL can happen in the Lambda function creation wizard.

With great power comes great foot-gun though… When the whole world can easily access your Lambda function URL, without authenticating, the whole world can run up your AWS bill easily.

Delete your Lambda function when you’re done with this tutorial

This blog post is a tutorial for creating a simple Hello World application using this new Lambda feature. I’m teaching some folks in my unit how to use AWS, and while there are many Lambda Hello World tutorials out there I didn’t find one that was quite right. This tutorial will go through almost the simplest setup possible, deploying Python code at a URL, then will iterate on the initial code to demonstrate some basic computation.

Read more »

Rust Number Conversion - Don't Follow the Book...

I’m at an intermediate level with the Rust programming language. I’ve done a year of adventofcode, a medium-sized API server project, and little more. While refactoring some code in my project recently I got rid of some of my explicit string conversions and let the type inference system and From/Into do their jobs. Now that I’m more comfortable with reading code using From/Into patterns I think it’s actually simpler - I can easily understand and trust what the type inference system does in those instances.…

Read more »

Using AWS Lambda as Proxy

AWS Lambdas are some of the original “serverless computing” implementations. These little bits of code run when you hit an API endpoint, taking whatever inputs you provide and returning the output. They can be written in many programming languages, including my favorite: Python 3. So I wondered - could I use this to build a simple little proxy at a URL? Why not, right? They can run any Python code… If I wanted to, I could use the result to evade perimeter firewalls that might be blocking many arbitrary destination hosts, but not AWS assets.…

Read more »

Creating a Roku Channel

I’ve been a Roku user for years. They were one of the original streaming boxes you could plug into your TV. Before I became one I debated over Mac Mini vs dedicated device… As a programmer - I love the ability to have complete (-ish) control over a device that’s outputting to a device so central to the home as a TV. As a person who pays an energy bill - I love something that sips less electricity in-general, like a more-dedicated device.…

Read more »

Reflections on Teaching Intro to Programming

Over the last semester I had the pleasure of teaching programming as an adjunct professor at a local major university. I sought out this opportunity because I genuinely enjoy teaching, I knew I’d have a little extra time on my hands, and I think it’s valuable to my current assignment to be in the community putting a face to the Air Force. I cold-called the computer science department and asked around just prior to the fall semester, and they were interested in bringing me on for the spring semester. More than that - they wanted someone to turn their existing Intro to Programming (in Python) course into an Internet-based course. Python is my jam, so this sounded good.

Python code on a computer screen, from https://commons.wikimedia.org/wiki/File:Python_image.jpg

Python lookin sharp.

I learned a lot while teaching this class: about teaching, about students, about learning Python, and about learning programming in-general. I wanted to put my thoughts down because they’ve been bubbling around in my head. I think this would be a great talk topic for some nerd conference too, so it makes sense to take the notes while they’re fresh.

Read more »

One-File Tools

Many of us use computers that are locked-down by some corporate policy. The restrictions prevent you from downloading software, or running anything that’s not pre-approved. Most of us have used workarounds of some type - Excel spreadsheets created by that one guy in the office, Word documents with macros, Sharepoint sites, maybe even the occasional Powershell script…

One-File Tools are open-source self-contained one-file utilities implemented as a webpage. These are easily shared, easily used, their saved versions may contain your user data. They don’t require an Internet connection.

Read more »

Scope: Not Just Mouthwash

I’m teaching a Python class which acts as an introduction to programming, for most of the students there. This is an awesome experience - for me personally because I enjoy this, and for my resume. I hope to do this full-time someday, but today I’ve just got 3 sections of the same class. We’re doing a lot of cool things that I should write about some other time - one of them is using a free, open source textbook called, Runestone - How to Think Like a Computer Scientist.…

Read more »

Deploying Github to Dreamhost

One feature I lost moving from Wordpress to Hugo for this blog was the ability to write a blog post from anywhere. I really liked being able to do that… I could be riding in the car, or smoking brisket at 2 AM, or on vacation without a computer, and just login and write something. I wanted that back - a posting solution from my cellphone. The reason I lost that ability is because the simplest update process for Hugo is:…

Read more »