As convenient and powerful as AWS API Gateway is, it’s not without its quirks. Here are a few lessons I’ve learned the hard way that can help you avoid some common pitfalls when working with AWS API Gateway.
Continue reading “AWS API Gateway Gotchas & Lessons Learned”Validating WebFlow Webhook Requests in AWS Lambda and Python
WebFlow is an outstanding website design, development, and hosting platform. The WebFlow API provides webhooks for a variety of important events, and it signs its webhook requests to allow users to validate webhook requests, and therefore confirm that requests actually come from WebFlow.
The below code sample shows how to verify WebFlow webhook requests in AWS Lambda functions using Python invoked via a Function URL, although the code will show the principles for validating requests in any language or platform.
Sample AWS Kinesis Firehose CloudWatch Log HTTP Endpoint Payload
I couldn’t find an example payload for CloudWatch Logs data delivered by a Kinesis Firehose stream to a Lambda function URL, so I set one up.
Sample payloads appear below, as well as a walkthrough of the process I used to create the data stream.
Continue reading “Sample AWS Kinesis Firehose CloudWatch Log HTTP Endpoint Payload”A Developer Workflow for Modern AWS Serverless Applications
Modern serverless applications on AWS are complex with a lot of moving parts. Mapping a developer workflow onto those applications can be difficult. This article discusses the developer workflow I have developed for complex serverless applications at aleph0, with example CloudFormation template and GitHub Action snippetes to illustrate the concepts.
The Lambda Iceberg: A Deep Dive on AWS Lambda for Java
AWS Lambda is Amazon’s FaaS product. Pound for pound, it’s one of the best serverless computing products on the market. Easy to use, inexpensive to run (among FaaS offerings), and with compelling features like Layers, Extensions, and SnapStart, Lambda is a rock-solid choice for building serverless architectures.
However, its managed nature cuts both ways. The same FaaS features that make it so easy to use for vanilla workloads — just upload your program and go — also make it hard to use for anything that requires even a little customization, like ML models. I’ve done some significant work building out complex lambda functions for Java lately, and while deploying these complex workloads on AWS Lambda using Java is complex, the reward — a perfectly elastic, pay-for-uptime microservice architecture — is well worth the effort. But it turns out there’s a lot of the “Lambda iceberg” below the water to understand before you can expect to get these complex serverless applications working with high performance and reliability.
In this blog series, I will unpack what I learned in my journey to deploy an OpenCV-backed ML model onto AWS Lambda with minimal cold start, and show how the process can be used to deploy ML models on other backends, like TensorFlow Lite, onto Lambda as well.
Java 21 Custom Runtime for AWS Lambda
By standing on the shoulders of giants (I’m looking at you, Mark Sailes), I was able to turn around an AWS Lambda Custom Runtime for Java 21 on Java 21 launch day. Instructions to use it are in the repo’s README. All files required to create your own function are in the releases, so no building required.
There are a couple of known issues, particularly around CDS (Class Data Sharing), per the but they appear to be (mostly) cosmetic at first blush. It’ll be fun ironing that out.
I’m also looking forward to releasing a custom image for Java 21, too, as soon as an updated Amazon Corretto image drops.
Happy hacking!
AWS ALB Jersey Lambda Target Gotchas
Thinking about using an AWS Lambda function using the excellent awslabs/aws-serverless-java-container as an AWS Application Load Balancer (ALB) target? There are some configuration gotchas you should know about!
Continue reading “AWS ALB Jersey Lambda Target Gotchas”