Week 31, 2018 - Lambda SQS event source; ALB redirects; Application Auto Scaling; Fargate in Sydney

A catch up of recent AWS releases: Lambda SQS event source, ALB redirects, Application Auto Scaling, and Fargate’s release in Sydney.

Due to various reasons I’ve been unable to write much lately, so I’m only highlighting some of the most interesting recent releases today. Hopefully I’ll soon be back to more regular and timely updates.

Lambda SQS event source

SQS is a great way to ensure messages are delivered between various processes in your architecture, but until the announcement that we can now use it as an event source it wasn’t quite as easy to use with Lambda. If you wanted to parse messages off of an SQS queue you needed to have a Lambda function that polled it on a regular basis (likely every minute or so), and then use that to either trigger other bigger1 functions or run it in the same function as your polling.

This worked but wasn’t ideal as it was overhead to maintain and harder to scale. That said, the actual implementation of it as an event source works pretty much the same way. Except that AWS is now transparently2 running the function for you that polls the SOS queue3. It will still send the messages in batches to your Lambda function, and will scale the number of batches according to how many functions you can run. So this definitely makes life easier if you want to use your queues to trigger functions.

ALB redirects

Speaking of making life easier, one thing that I’ve seen often is the need for simple redirects. Especially the redirect from http to https. Up until last week this would always require a redirect made in your web server, making the feedback loop a bit bigger, putting unnecessary load on your servers4, and sometimes even creating the need for additional proxies.

So I’m personally very happy to see that it’s now possible in Application Load Balancers to set up redirects. Even better, as you can share a single ALB across many applications using target groups you can use a single rule to enable this for all of these applications. This is especially nice if these are Docker containers and you don’t have to deal with this anymore. If you then combine this with something like the built-in authentication and it seems like ALBs are slowly but surely removing the need for proxies.

Application Auto Scaling

I’ve mentioned the new unified auto scaling functionality before, but it has now been improved quite a bit, and has rolled out to more regions. It now allows you to scale everything that is dynamic. That means it is not just limited to EC2 instances, containers, or DynamoDB, but includes some things you might not immediately take into account such as the number of instances in your Aurora cluster. Netflix has a nice write up of how they use it with their container orchestration tool Titus, which I discussed when they open source it.

Fargate in Sydney

While it might not matter as much to some of you, the release of Fargate in Sydney was my favourite news item this past month. If you’re not familiar with it, Fargate allows you to run containers without the need to manage the underlying infrastructure, thereby basically making it serverless containers. This can be very useful, and last week I wrote about how this can be used to build serverless bastion hosts.

  1. As in, higher specced and therefore more expensive. [return]
  2. And for free [return]
  3. Standard only, not FIFO queues. In case you’re in a region that supports those. [return]
  4. Even tiny amounts can matter when it concerns a lot of calls. [return]
Don't ignore new content! Get the latest by subscribing through RSS, Twitter, or email!
comments powered by Disqus