I’ve been coding in the intervening month (mostly working on a pinhole camera construction calculator for a friend), but definitely haven’t been diligent about documenting it.

TL;DR I set up a Docassemble instance using the Suffolk LIT Lab Legal Tech Class textbook (written by Quinten Steenhuis & other contributors), with AWS Lightsail and S3. You can check it out at docassemble.tomoe.asia. Do back up your docassemble interviews though, because I might not pay for this Lightsail instance forever. :P

Instead of setting up a nice sensible local install, I decided that I might as well try to learn how to use AWS before my free AWS credits from one of the JuniorDev meetups expired.

As usual, setting things up is never straightforward, but here are the things I’ve learnt to pay more attention to (in decreasing order of significance):

1. Learning how to isolate a problem.

I could not, for the life of me, access my server at the start. Nothing was loading when I accessed the address I’d mapped to it. Logging is an important part of the troubleshooting process as finding out what exactly is going on helps to locate the problem.

2. Logs as the first port of call

To get some sense of what’s going on, referring to Docassemble’s documentation helped a lot as it provided advice on troubleshooting through viewing logs

After logging the initialize process, I realised that it could not connect to my AWS S3 endpoint URL.

Logs for initialization process

This is where I realised that I had a typo in my env.list file, where I’d typed my server region (ap-southeast-1a) instead of my S3 region (ap-southeast-1). Typos have material consequences here, sometimes more so than law.

3. Solving one problem sometimes means paving the way to find another one.

After I fixed my env.list config blunder, I checked the logs and everything seemed to be fine (appropriate processes were running/terminated). However, accessing docassemble.tomoe.asia still wasn’t working.

Why ?????

To locate the (new) problem, I had to recognise that there are at least 2 points of failure:

  1. The docassemble instance itself
  2. Connecting the docassemble instance to a domain name

I realised it was (2) after I successfully accessed the site with my static IP address. I can’t remember what exactly I did to fix it though, but I remember it’s where the problem was.

4. Silly mistakes will happen, so just have a good sense of humour about it (but also remember to fix them)

After the env.list blunder, something new happened while I was trying to add a HTTPS connection (so I don’t look like a scammer when friends try my server and are told that their connection is not secure). I was setting stuff up with Let’s Encrypt, but HTTPS wasn’t happening.

There’s no particular method to this, but after staring at the Suffolk LIT guide, I realised that I had accidentally skipped a step in enabling HTTPS connections for my IPv4 Firewall. 🤡

Sometimes, trying to do things while my eyes are dry and tired means that I skip crucial steps. I will try not to deploy things at 2 in the morning and instead learn to stop, and carry on the next day. I have to accept that I cannot solve every problem I face in one sitting. This will become more true as the size and complexity of problems I face increases. If I can solve every problem in one sitting, it means that I’m probably not pushing my limits in terms of seeking out harder problems to solve.