Had a blast at PyConSG 2019, really cool to be in the presence of so many pythonistas. Would definitely recommend, especially since python is one of the more broadly used languages (AI, Blockchain, RPA, etc). My talk was on AWS Lambda (naturally!). Slide deck can be found in this GitHub Repo. Let me know what you think either in the comments here or on Youtube. Or mail me keith [at] keithrozario...
Cloud Run — is it the ultimate Fat lambda?
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
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!
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
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
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
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
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
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
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...