Serverless

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 »

AWS Lambda: how to detect and stop accidental infinite recursions

Lambda makes it easy to build event-driven architectures. Each function only needs to look after its own responsibilities. We chain them together through APIs, queues, streams, and other event sources. It’s a good way to build complex systems out of simple components. We need only managed services, and we only pay for them when we …

AWS Lambda: how to detect and stop accidental infinite recursions Read More »

ICYMI: five updates you’ve missed about Serverless Step Functions

Over the last 6 months, we have made the Serverless Step Functions plugin better and more useful. Here are the most impactful changes, in case you missed it! Support for intrinsic function One of the main pain points of using the plugin has long been that you needed to use fully-formed ARNs. As of v1.18.0 …

ICYMI: five updates you’ve missed about Serverless Step Functions Read More »

How to include Serverless Repository apps in serverless.yml

Over the past year, the Serverless Application Repository (SAR) service has improved a lot. I have grown to enjoy it more and more, and have contributed a few applications myself: lambda-janitor: cron job to delete old, unused versions of all Lambda functions in the region to free up storage space. auto-subscribe-log-group-to-arn: subscribes new and existing …

How to include Serverless Repository apps in serverless.yml Read More »

CloudFormation protip: use !Sub instead of !Join

CloudFormation supports a number of intrinsic functions and Fn::Join (or !Join) is often used to construct parameterised names and paths. The Serverless framework, for instance, uses it extensively. A quick look in a CloudFormation it generates I can see Fn::Join used for: IAM policy names IAM role names IAM principals API Gateway URIs Resource ARNs and …

CloudFormation protip: use !Sub instead of !Join 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 »

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