This is the kind of topic that makes me think “why would we want to do that?” and “is there something else we can do instead?”. However, the topic does come up occasionally, and you’re interested enough to be reading this post, so let’s discuss and look at a couple of solutions.

I’m using ‘trigger’ as a short-hand for the event source mappings that integrate Lambda with SQS, DynamoDB Streams, Kinesis, Kafka, etc.

Photo by Mika Baumeister on Unsplash

Why do I try to avoid this?

Let’s start with some reasons why I usually try to avoid enabling and disabling Lambda event source mappings on a schedule.


An API was recently being designed at work that would enable restaurant owners to request changes to their logo and other images. The idea is that restaurants use a website to upload a new image and trigger a review process. I was asked to advise on how we should handle the image upload.

Initially, there were two options being considered. The first was to encode the image using Base64 and include it in the JSON of the API request that starts the review process. …


The day we’ve been waiting for came yesterday when support for .NET Core 3.1 on AWS Lambda was announced. If you recall, AWS’ policy is to only support LTS versions of .NET Core, so it was only a matter of time. Almost four months since 3.1 was announced, actually.

To my knowledge, .NET Core 3.1 doesn’t contain any changes from 3.0 that would affect its performance on AWS Lambda, so my recommendations shouldn’t need to change. In fact, AWS made one of the same recommendations when they advised turning on ReadyToRun for better cold start performance. In my post, I…


.NET Core 3.0 has been out of preview for about a month now. In that time, I’ve had several people ask me to follow up on my previous benchmarks and provide new recommendations. It’s taken some time, but the results are in!

Photo by Jason Chen on Unsplash

Just like .NET Core 2.2, AWS Lambda won’t have native support for 3.0 because it’s not an LTS version. Instead, you must use AWS Lambda’s Custom Runtime which is quite easy.

The other big differences with 3.0 are the compile-time options that have been added and changed. The four most interesting options in 3.0 are:

ReadyToRun

R2R is a…


Step Functions is one of my favourite AWS services. I enjoy experimenting with it, especially when new features are released. In my opinion, two of the most important changes since launch have been the additional Service Integrations and Task Tokens.

Photo by Pavan Trikutam on Unsplash

Prior to the new Service Integrations, if you wanted to interact with other AWS services from your Step Function, you needed to invoke a Lambda function that would call the other service. On Nov 29, 2018, AWS added eight new Service Integrations that allow you to directly call more core services like DynamoDB, SQS, and SNS.

Service Integrations give Step…


I think it’s fair to say that everyone who uses Lambda is aware of CloudWatch. It’s well known that a call to your language’s version of console.log, print, or Console.WriteLine will result in text appearing in CloudWatch logs. This is usually where a lot of people’s understanding ends, though.

Don’t get me wrong, this is usually enough to successfully debug a Lambda function. However, I think a deeper understanding can help reason about your function’s logs more easily and unlock new possibilities.

In this post, I’ll explain how Groups, Streams, and Events fit together, describe some relevant parts of the…


This is a follow-up to my Lambda Concurrency Limits and SQS Triggers Don’t Mix Well (Sometimes) post from earlier in the year. In that post, I described an issue that happens if you configure a Lambda function with a low concurrency limit and an SQS trigger. Though I’ll try to summarise, I suggest you read that post first to get the full context.

Photo by Harshil Gudka via Unsplash

The issue I wrote about exists because the number of messages being read from the SQS queue is not directly connected to the concurrency limit of the Lambda function. Instead, when an SQS trigger is initially enabled…


Not long ago, I wrote a detailed guide on how to Store and Rotate API Keys with AWS Secrets Manager. In that guide, I briefly mentioned that secrets could be automatically rotated with an interval between 1 and 365 days.

Imagine you set the interval to 1 day. On which day, hour, and minute will the secret be rotated? The answer is a little strange, so let me explain.

Photo Malvestida Magazine via Unsplash

The Secrets Manager documentation contains a decent explanation. However, I didn’t interpret it correctly the first time I read it.

Secrets Manager schedules the date by adding the rotation interval (number…


Almost a month ago, I benchmarked the custom runtime AWS created to enable .NET developers to run any version of .NET Core on Lambda.

Included in that post was a benchmark comparing a normal .NET Core 2.1 function to a .NET Core 2.2 function using the new custom runtime. After publishing, I was asked to add .NET Core 3.0-preview3, which I did.

The results were surprising.

.NET Core 3.0-preview showed cold start times similar to 2.2, but much worse performance on warm starts. Following that update, I was asked by Rich Lander from Microsoft to help them investigate further.

It…


Today, AWS released a new library named Amazon.Lambda.RuntimeSupport.
It contains a Custom Lambda Runtime made for those who want to use newer versions of .NET Core such as 2.2 or the 3.0 preview (and any future version).

Until now, Lambda has only provided native support for .NET Core 2.0 and 2.1. Amazon says that in the future they will only build Long Term Support releases of .NET Core directly into Lambda. For anything else, it looks like this new library is the solution.

In this post, I’ll talk about what AWS has done, and then take a look at how…

Zac Charles

Principal Engineer @ Just Eat Takeaway.com | AWS Community Builder

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store