Hi, welcome to another weekly update.
We welcome Trek10 as our sponsor for June!
It is my pleasure to welcome Trek10 as our sponsor for this month, let’s hear from them.
Serverless computing can seriously reduce TCO and time to market. But serverless is a new discipline. The best practices are emerging, and even large enterprises often struggle with some challenges:– Laying foundations for serverless on AWS– Migrating a legacy solution to Serverless– Winning over serverless skeptics– Shortening development cycles– Identifying and avoiding common pitfalls– Enabling teams for successWith numerous production serverless deployments under their belts, Trek10’s experts know how to deliver solutions that take full advantage of the AWS cloud: cost-effective, extensible, and low-maintenance serverless applications. Now, we’re bringing that expertise to you in the form of our Developer Acceleration solution. We’ll challenge your development team to re-examine their assumptions, empower them to take on new challenges, and level up your organization for sustained serverless success. Schedule your workshop today >> https://www.trek10.com/
A self-healing Kinesis function that adapts its throughput based on performance. In this post, I discussed how me and a client of mine tackled a challenge they had – how to make a Kinesis function adjust its own throughput at runtime. The client had an interesting requirement because of downstream constraints. We arrived at a solution that implements a circuit-breaker for the Kinesis function and let the function adapt its throughput carefully so to not overwhelm the downstream system.
ICYMI: five updates you’ve missed about Serverless Step Functions. This is a round up of the five biggest changes we have made to the serverless-step-functions plugin for the Serverless framework. If you’re using the Serverless framework and considering Step Functions then you should definitely check out the plugin. It can make your life so much easier when working with Step Functions. Also, check out my video course if you’re looking for a way to get started with Step Function!
How to log timed out Lambda invocations. In this post, I discussed an approach for logging error messages for when a function invocation times out. These time out errors are often hidden in the Invocation Error metric and are hard to debug. We have also published a middy middleware to make this really easy to apply to your functions.
I want to take this opportunity to give a shout out to the folks at the Serverless framework. They did a good job and curated a list of video courses on serverless, which features courses on a variety of topics around serverless development and is well worth checking out!
Open source contributions
We have made a number of updates in response to new AWS announcements and your feedback:
- support the new callback patterns for workflows
- allow you to specify an IAM role override for API Gateway
- support authorization scopes for Cognito User Pools
It’s been a long time coming, but we have finally open sourced some internal tooling we use to build observability into our Lambda functions. You can find the source code for the repo here.
The project is a collection of tightly integrated tools, including:
- a correlation-ids package for recording correlation IDs.
- a logger package that supports structured logging and would automatically include the current correlation IDs.
- a collection of middy middlewares for extracting correlation IDs from the invocation event, sample logging, logging timeout errors and obfuscation.
- a collection of client libraries for HTTP, SNS, SQS, Kinesis, Step Functions and Lambda, all of which knows how to forward the current correlation IDs on.
- a wrapper which applies and configures the aforementioned middlewares to your handler.
It has been the collaborative effort for several people at DAZN to bring this project to life and it’s now widely adopted inside DAZN. Many of you have asked us to open source it, and now it finally is! A more extensive write up is on the way, which would explain how everything fits together. In the meantime, please check out the project repo and give them a try!
Enjoy what you’re reading? Subscribe to my newsletter and get more content on AWS and serverless technologies delivered straight to your inbox.
I’m an AWS Serverless Hero and the author of Production-Ready Serverless. I have run production workload at scale in AWS for nearly 10 years and I have been an architect or principal engineer with a variety of industries ranging from banking, e-commerce, sports streaming to mobile gaming. I currently work as an independent consultant focused on AWS and serverless.
In this course, we’ll cover everything you need to know to use AWS Step Functions service effectively. Including basic concepts, HTTP and event triggers, activities, design patterns and best practices.
Here is a complete list of all my posts on serverless and AWS Lambda. In the meantime, here are a few of my most popular blog posts.
- Lambda optimization tip – enable HTTP keep-alive
- You are thinking about serverless costs all wrong
- Many faced threats to Serverless security
- We can do better than percentile latencies
- I’m afraid you’re thinking about AWS Lambda cold starts all wrong
- Yubl’s road to Serverless
- AWS Lambda – should you have few monolithic functions or many single-purposed functions?
- AWS Lambda – compare coldstart time with different languages, memory and code sizes
- Guys, we’re doing pagination wrong