Our serverless superhero this week is Eric Johnson, principal serverless DA at AWS. Eric is the guy when it comes to serverless, constantly doing web shows, speaking at conferences, answering questions on social media, doing customer calls, and probably a hundred more things. I have no idea how he does it. If you ever have a question about anything related to serverless, Eric probably knows the answer. Thank you Eric, for shaping the serverless community into what it is today!
In issue #45 we had a great post from Ran Isenberg on time-based feature flag triggers. Well, he’s back, but this time on the AWS blog to talk about implementing feature flags with AWS AppConfig end-to-end. This post describes some of the business challenges that feature flags solve, how Ran writes, stores, and deploys them, and of course, goes into best practices around them. It’s a great case study of how CyberArk uses them in production and is an inspiring read for those of us looking to get into them.
I’ve heard of DuckDB gaining popularity in the serverless world but haven’t had the chance to try it myself. But now thanks to Tobias Müller it’s easier than ever. In his post on using DuckDB in AWS Lambda, he talks about how he got around some difficulties using the package in Lambda and how he built a layer that anybody can use in a pinch. I see a lot of promise for this going forward as we push for dynamic analytic queries with fully serverless apps.
Speaking of Lambda layers, Ran Isenberg posted another great article last week about Lambda layer best practices. He talks about the pros and cons of layers (which is typically a heated debate in the community) and gives us several best practices around security, deployment, and number of layers. As always, Ran gives us a working CDK example which is always a great boost to try it ourselves.
Global applications have some interesting challenges to overcome with one of them being edge optimization or getting your code closer to your users. Daniele Frasca shared a post cleverly titled Get Me There Faster where he describes how to use CloudFront and Global Accelerator to boost the performance of your app anywhere in the world. He describes when you would use Global Accelerator over CloudFront and shows a way you can use both of them together.
I (Allen Helton) recently gave a talk at the Serverless NYC and Boston meetup groups on how I built an open source newsletter platform. I talk about the overall architecture, why I had to move away from my old solution, some cool new features I built as a result, and discuss my definition of serverless.
DataDog just released an amazing new feature called cold start tracing. As you could probably infer, this feature shows where the time is being spent bootstrapping your Lambda function. It provides a crystal clear window into what is making your cold start times slower.
Momento released a fourth new cacheable data type last week: sorted sets. This new data type will automatically sort elements by a
score, opening up use cases like leaderboards and secondary indexing directly in a cache!
You can now connect Kinesis Data Streams to DynamoDB global tables in CloudFormation. I believe this functionality was only doable through the console or API, so it’s nice to have it available in IaC.
Baselime tracing was released last week, bringing distributed traces of your applications using OpenTelemetry or AWS X-Ray data to the forefront. This functionality will tie specific CloudWatch logs to individual traces, enabling you to get directly to the detail as fast as possible.
I love cool and practical use cases that get your mind turning with new ideas. That is exactly what Lee Gilmore did last week with his post, Serverless Amazon Location Service. It takes us through how to build a restaurant app using the Amazon Location Service to calculate routes and estimate delivery time and distance for food orders. The example is well thought out and as always, nicely illustrated to keep you engaged the whole way through. If you want to take the code and run with it, Lee has the full source available on GitHub deployable with the CDK.
AJ Stuyvenberg gave us a first look into the new release from DataDog dissecting Lambda function cold starts. He is rationalizing what we’re seeing now that there’s visibility into exactly what a cold start is doing.
Here's a Cold Start Trace from #Lambda Node 18.x using the runtime-provided aws-sdk v3.— AJ Stuyvenberg (@astuyve) February 17, 2023
A few observations:
- STS seems to add 100ms, and has a number of dependencies.
- It's interesting to me that the bundled version isn't tree-shaken.
What have you noticed? #serverless pic.twitter.com/S2iCMl5zqM
Catch me on the Saas Factory live stream this Wednesday, February 22, at 8am CST. I’ll be talking with Khawaja Shams and Gunnar Grosch about how we built a serverless service at Momento and how that architecture is repeatable so you can build one yourself!