June 2, 2018

Weeknote 2

This was a short week. Monday was a Bank Holiday. On Wednesday I stayed at home because of sinus fatigue (hayfever sucks!) and didn’t get much done. But I did some proper infrastructure work this week.

AWS Lambda

Some teams within GDS are experimenting with using AWS Lambda, a service that runs your code for you and saves worrying about servers or containers and only charges you for its compute time. The team I’m visiting is trying it for deploying an hourly batch job, and I’m helping because of delays with the main thing I’m there for.

The system’s aim is for a web endpoint that fetches several resources, verifies their signatures, and saves them into an object store. It’s a cache that also verifies signatures. We’re using a Lambda function for that web endpoint, and an S3 bucket as the object store, but there’s several more components needed.

We’re using Terraform to define the infrastructure into code, but sadly this isn’t in the open. To be consistent with other projects we don’t want to use Terraform to deploy code to the Lambda, so we’ve had to find a different way to do that.

Borrowing from an approach AWS advised, we’ve created an extra Lambda function and S3 bucket. This “update” function has IAM permissions to change the code of the function we care about. When a JAR file is placed in the S3 bucket, a SNS notification calls the update function (based on this Terraform example.)

I have mixed feelings. This might work and never need touching again—or have unexpected problems that are hard to investigate because so many of Amazon’s services (e.g., IAM) are black boxes and don’t log their decision-making. I prefer systems where things are more explicit, because how they work can be investigated and rediscovered. But this will teach us something, and I hope I can put in place testing to highlight what is broken if things break.

Bringing more of myself to work

In my own time I’ve been trying to bring more of myself to work, and act less. Not pretending happiness when unhappy is a bit scary around other people, but gosh it’s relieving. I resorted to a guide of how to show emotions to figure out healthy ways to express myself without causing problems for others. It seems to be going well—next week I hope to find a way to ask for feedback about it.

Next week will be quite interesting. I’m shadowing a Delivery Manager; hoping to learn more about what they do, how it might suit me, and how to protect my own energy better. Given that this infrastructure relies on events happening as expected, I also hope to put in place some automated testing.