Programming

All you need to know about caching for serverless applications

Caching is still important for serverless architectures. Just because AWS Lambda auto-scales by traffic, it doesn’t mean we can forget about caching. In this post, let’s break down by caching is still relevant for serverless and where we can apply caching in a serverless architecture. Caching is still VERY relevant. Yes, Lambda auto-scales by traffic. …

All you need to know about caching for serverless applications Read More »

AWS Lambda: how to share code between functions in a monorepo

A while back, a client asked me “how can I share business logic between services in a Node.js monorepo?”. The TL;DR of it is: Encapsulate the shared business logic into modules, and put them in a separate folder. In the Lambda handler functions, reference the shared modules using relative paths. Use webpack to resolve and …

AWS Lambda: how to share code between functions in a monorepo Read More »

Step Functions as an ad-hoc scheduling mechanism

We previously discussed how you can implement an ad-hoc scheduling system using DynamoDB TTL as well as CloudWatch Events. And now, let’s see how you can implement the same system using AWS Step Functions and the pros and cons of this approach. As before, we will assess this approach using the following criteria: Precision: how …

Step Functions as an ad-hoc scheduling mechanism Read More »

Using CloudWatch and Lambda to implement ad-hoc scheduling

A while back I wrote about using DynamoDB TTL to implement ad-hoc scheduling. It generated some healthy debate and a few of you have mentioned alternatives including using Step Functions. So let’s take a look at some of these alternatives, starting with the simplest – using a cron job. We will assess this approach using the …

Using CloudWatch and Lambda to implement ad-hoc scheduling Read More »

Making Terraform and Serverless framework work together

The Serverless Framework [1] is still the most popular deployment framework for serverless applications. It gives you a convenient abstraction over CloudFormation and some best practices out of the box: Filters out dev dependencies for Node.js function. Update deployment packages to S3, which lets you work around the default 50MB limit on deployment packages. Enforces …

Making Terraform and Serverless framework work together Read More »

Understanding the scaling behaviour of DynamoDB OnDemand tables

Update 15/03/2019: Thanks to Zac Charles who pointed me to this new page in the DynamoDB docs. It explains how the OnDemand capacity mode works. Turns out you DON’T need to pre-warm a table. You just need to create the table with the desired peak throughput (Provisioned), and then change it to OnDemand. After you change the table to OnDemand …

Understanding the scaling behaviour of DynamoDB OnDemand tables Read More »

DynamoDB TTL as an ad-hoc scheduling mechanism

CloudWatch Events let you easily create cron jobs with Lambda. However, it’s not designed for running lots of ad-hoc tasks, each to be executed once, at a specific time. The default limit on CloudWatch Events is a lowly 100 rules per region per account. It’s a soft limit, so it’s possible to request a limit …

DynamoDB TTL as an ad-hoc scheduling mechanism Read More »

What is the best event source for doing pub-sub with AWS Lambda?

AWS offers a wealth of options for implementing messaging patterns such as pub-sub with Lambda, let’s compare and contrast some of these options. The pub-sub pattern Publish-Subscribe (often shortened to pub-sub) is a messaging pattern where publishers and subscribers are decoupled through an intermediary broker (ZeroMQ, RabbitMQ, SNS, etc.). SNS + Lambda In the AWS ecosystem, the obvious …

What is the best event source for doing pub-sub with AWS Lambda? Read More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close