Programming

Just how expensive is the full AWS SDK?

If you’re not familiar with how cold start works within the context of AWS Lambda, then read this post first. update 24/03/2019: the tests include WebPack as well. When a Node.js Lambda function cold starts, a number of things happen: the Lambda service has to find a server with enough capacity to host the new …

Just how expensive is the full AWS SDK? Read More »

Making Terraform and Serverless framework work together

The Serverless framework is 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 a consistent naming convention for …

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 »

You need to use structured logging with AWS Lambda

This is a lesson that I wished I learnt when I first started using AWS Lambda in anger, it would have made my life simpler right from the start.  But, we did get there before long, and it allowed us to track and include correlation IDs in our log messages (which are then pushed to an ELK stack)which would …

You need to use structured logging with AWS Lambda Read More »

I’m afraid you’re thinking about AWS Lambda cold starts all wrong

When I discuss AWS Lambda cold starts with folks in the context of API Gateway, I often get responses along the line of: Meh, it’s only the first request right? So what if one request is slow, the next million requests would be fast. Unfortunately that is an oversimplification of what happens. Cold start happens once for …

I’m afraid you’re thinking about AWS Lambda cold starts all wrong Read More »

Finding coldstarts : how long does AWS Lambda keep your idle functions around?

In the last post I compared the coldstart time for Lambda functions with different language, memory and code size. One of the things I learnt was that idle functions are no longer terminated after 5 minutes of inactivity. /2017/06/aws-lambda-compare-coldstart-time-with-different-languages-memory-and-code-sizes/ It is a fantastic news and something that Amazon has quietly changed behind the scene. However, …

Finding coldstarts : how long does AWS Lambda keep your idle functions around? Read More »

From F# to Scala – implicits

Read the whole series: Part 1 — type inference Part 2 — traits Part 3 — case class/object (ADTs) Part 4 — apply & unapply functions Part 5 — implicits <- you’re here Having looked at case class and extractors recently, the next logical thing would be partial functions. Since Andrea pointed me to a really well article on the subject I don’t think …

From F# to Scala – implicits Read More »

From F# to Scala – apply & unapply functions

Read the whole series: Part 1 — type inference Part 2 — traits Part 3 — case class/object (ADTs) Part 4 — apply & unapply functions <- you’re here Part 5 — implicits Last time around we looked at Scala’s Case Class in depth and how it compares to F#’s Discriminated Unions. F# also has Active Patterns, which is a very powerful language …

From F# to Scala – apply & unapply functions 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