Keith is an architect by day, blogger by night. He’s responsible for all the content on this blog, and irresponsible for everything else.

Latest stories

Cloud Run — is it the ultimate Fat lambda?

C

Everyone knows that I’m a Lambda fanboy, and to be fair Lambda deserves all the praise it gets, it is **the** gold-standard for serverless functions. But yesterday, I gave Google Cloudrun a spin, and boy(!) is Lambda is going to get a run for its money. Which is surprising given Google has traditionally lagged in this area — isn’t it quaint that we use words like...

Multiprocessing in Lambda Functions

M

Lambda functions are awesome, but they only provide a single dimension to allocate resources – memorySize. The simplicity is refreshing, as lambda functions are complex enough — but AWS really shouldn’t have called it memorySize if it controls CPU as well. Then again this is the company that gave us Systems Manager Session Manager, so the naming could have been worse (much worse...

Updating a GitHub repo from a Lambda Function using Bash!

U

At the end of 2018, AWS introduced custom runtimes for Lambda functions, which provided customers a way to run applications written in languages not in the holy list of the ‘Official AWS Lambda Runtimes’ which include a plethora of languages. It has 3 versions of Python, 2 versions of Node, Ruby, Java, Go and .NET core (that’s a lot of language support) Security-wise, it’s...

Interactive Shell on a Lambda Function

I

One of a great things about Lambda functions is that you can’t SSH into it. This sounds like a drawback, but actually it’s a great security benefit — you can’t hack what you can’t access. Although it’s rare to see SSH used as an entry path for attackers these days, it’s not uncommon to see organizations lose SSH keys every once in a while. So cutting down...

Klayers Part 1: Building Lambda Layers with Lambda Functions

K

This is a continuation in the Klayers series, where I deep dive into the architecture of Klayers. At its core, Klayers is a collection of AWS Lambda Layers for Python3, with the idea that python packages in layers is more efficient than packaging them with application code. Visit the GitHub repo here, where you’d find 50+ lambda layers for public consumption across most AWS regions...

Klayers Part 0: Introduction

K

I’ve been bitten by the serverless bug lately, and just completed my latest hobby project this week. It’s a fully serverless pipeline that builds python packages as Lambda layers — and it uses Lambda functions to do so. As a quick side-note, before we dive into this intro, Lambda layers are simply zip files that get extracted into the /opt directory of your lambda...

You own your software supply chain

Y

Just this week, my team was on the cusp of demo-ing a product they’ve been working on for the last 2 months, only for a build process to fail, just hours before the demo to some very high ranking people. Troubleshooting the build took a while, but eventually we found the root cause, a missing package version! This probably wouldn’t have been a big deal, had we not stumbled across it...

Spacy in a Lambda

S

I’ve been really digging into Lambda Layers lately, and once you begin using layers you’ll wonder how you got by without them. Layers allow you to package just about anything into lambda, but in a modular way. So elements of your code that don’t change much, can be packaged into layers, while keeping your actual lambda deployment for just the code that’s changing...

Copy Millions of S3 Objects in minutes

C

Recently I found myself working with an S3 bucket of 13,000 csv files that I needed to query. Initially, I was excited, because now had an excuse to play with AWS Athena or S3 Select — two serverless tools I been meaning to dive into. But that excitement — was short-lived! For some (as yet unexplained) reason, AWS Athena is not available in us-west-1. Which seemingly, is the only...

Using Terraform and Serverless Framework

U

Image from wikicommons. The Serverless framework (SF) is a fantastic tool for testing and deploying lambda functions, but it’s reliance on cloudformation makes it clumsy for infrastructure like DynamoDB, S3 or SQS queues. For example, if your serverless.yml file had 5 lambdas, you’d be able to sls deploy all day long. But add just one S3 bucket, and you’d first have to sls...