Lambda

Introducing a better way to record custom metrics

Many clients have asked me “how do I record custom metrics from Lambda?”. Generally speaking, you can either: Publish custom metrics synchronously – e.g. send them at the end of an invocation. Publish custom metrics asynchronously by writing them to stdout first and then extracting them from CloudWatch Logs. Problems with sending custom metrics synchronously …

Introducing a better way to record custom metrics Read More »

How to connect SNS to Kinesis for cross-account delivery via API Gateway

At DAZN (where I no longer work), the teams work with a number of third-party providers. They often have to synchronize data between different AWS accounts. SNS to SQS is the primary mechanism for these cross-account deliveries because: it was an established pattern within the organization DAZN engineers and third-party engineers are both familiar with …

How to connect SNS to Kinesis for cross-account delivery via API Gateway 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 »

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 »

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