Serverless at re:Invent 2017

Symphonia
Mike Roberts
Dec 6, 2017

The light show at the re:Play party

Another re:Invent has come and gone, and us mere AWS-using mortals are now rapidly trying to sort the wheat from the chaff of a heady harvest of announcements.

It's funny to think that AWS Lambda was announced at re:Invent only 3 years ago — the industry and Lambda platform both have moved forward a long way since.

This year's re:Invent saw a lot of incremental improvements for Lambda and its related services. We saw some big new products and features from Lambda's AWS neighbors. We also heard some notable silences where we expected updates — skip to the end if you want my take on those.

Let's dig in!

Lambda Runtime and Platform

I'm going to start by looking at the core Lambda product — the Functions-as-a-Service (FaaS) platform which is the core of AWS’ larger Serverless service suite.

First of all it's fascinating to see how ubiquitous Lambda has become within AWS. It's no longer a niche technology for enthusiasts — it's increasingly becoming a core compute element within the larger Amazon cloud.

One of the most significant announcements of the entire conference to me was that of per-function concurrency control. One of Lambda's big drawbacks, until last week, was that downstream resources could be overwhelmed by the massive and uncontrollable horizontal scaling that AWS provide in Lambda. With the new concurrent execution limits an individual function's maximum concurrency can be dialed down, with high precision. Interestingly this same configuration reserves concurrency for a function, avoiding the accidental self-Denial-of-Service problems that can also occur with Lambda. We're not sure why these two aspects were combined (we assume it's related to implementation, and isolation of functions) and we'll be writing another article on this new double-feature soon.

Lambda functions can now be configured to have 3GB RAM, up from 1.5GB. Correspondingly, 3GB functions should see a 2x CPU performance improvement over 1.5GB Lambdas, but this is through doubling the number of cores the function has access to, rather than double the virtualized time-slices. That means that 3GB functions might not see a linear speed bump for primarily single threaded functions. We plan to test this out when we get the chance.

Traffic shaping / canary deployment was pre-announced at Serverless Conf NYC in October, and this is now available. Tooling has been updated to support this new feature too (see below.)

The Lambda runtime has seen significant improvements in Cold Start time (see here if you want to learn about Cold Starts.) We haven't seen specific examples on this, but Tim Wagner (GM — Lambda and API Gateway) claimed ‘up to 80% improvements’. Apparently it's something to do with SquashFS, and you need to deploy a new version of your functions to see the improvement in the short term.

And finally Go support was pre-announced, in a move sure to make a lot of gopher-programmers happy.

API Gateway

API Gateway saw fewer updates than that of the Lambda platform, but we did already get some big updates a few weeks ago around regional endpoints.

Like Lambda, API Gateway now supports canary deployment / traffic shaping.

API Gateway can now be used to provide an internet-accessible public front to web services enclosed within a VPC. Note that the API Gateway is not itself in the VPC, in other words you can't access an API gateway directly from an elastic (static) IP within a VPC. But if you have an existing web service that you want to make visible outside your VPC, adding the authorization options that VPC has, this is worth checking out.

Tooling

We often complain about the lack of maturity of tooling for Serverless development, and we were happy to see a lot of updates in this area.

One of the biggest changes was a significantly overhauled Lambda Console, just after we'd got used to the last smaller set of changes only a couple of months ago! Specific improvements include

  • A new code editor for those who write their Lambda functions in Javascript and Python, far superior to the old inline code-editor. This is based on Cloud9, which I'll discuss in a moment, but is not as extensive as the full Cloud9 editor (e.g. there's no inline debugging available in the Lambda Console.)
  • New editor support for editing Javascript and Python Lambdas that consist of a zip file of source, not just a single source file. Also allows for creating new files in line. We don't recommend using this as a regular process for production use, but it might come in handy at development time.
  • Monitoring widgets on the console are much better now, e.g. for selecting different time periods.
  • Also, you can drill into logs by selecting a time window (dragging a selection) in any monitoring widget. This will bring up a time-window-constrained log view in CloudWatch Logs, aggregated over all Log Streams (yay!)
  • Graphically displays triggers and roles of services used.

Lambda CloudWatch support now also includes a new (7th!) out-of-the-box metric — ‘concurrent executions’. This makes for a very untidy monitoring tab in the Lambda console, but we'll deal with that for the extra data. As with all the other Lambda metrics this value can be viewed on a per-function basis, or aggregated across a set of functions or entire account.

Lambda can now be configured to post invocation events to CloudTrail. This can be useful for regulation / compliance reasons.

SAM — the Serverless Application Model, and Amazon's answer to the Serverless Framework — got some updates. First you can now configure ‘globals’ — default values that apply to all resources of the same type. A much bigger update is the new integration with CodeDeploy to support Traffic Shaping and Canary Releases. This is likely to be a huge improvement for many teams, and we look forward to trying it out soon. Amazon's Chris Munns gave a talk on these updates, and more, which you may want to check out.

Cloud9 was a big announcement for re:Invent overall, getting a lot of love during Werner's keynote, including a great demo by Clare Liguori. Cloud9 is, at its most simple, a cloud hosted IDE. Personally we're not sure about it yet — we have powerful laptops and are perfectly happy with a combination of IntelliJ and the rapidly evolving VS Code editor from Microsoft. But we're keeping an open mind.

The reason for mentioning Cloud9 in this roundup is that it has a lot of built-in support for Lambda, including easy deployment of Lambda functions. It also has Lambda debugging support, but it's important to note that this uses SAM Local, meaning the debugging is ‘local’ to the Cloud9 environment. Debugging of the actual Lambda platform environment is still not available, and nor is attaching a development version of a Lambda function to a platform-sourced event. Despite the fanfare, therefore, AWS is still behind Microsoft Azure Functions when it comes to debug tooling.

Finally, on the tooling front, is the new Serverless Application Repository (SAR), following somewhat in the footsteps of products like Stdlib. We haven't tried out SAR yet since it was only pre-announced, but when we do we'll give an update here, on the blog.

Lambda@Edge

Lambda@Edge — Lambda functions hosted within Cloudfront — got their updates in the couple of weeks leading up to re:Invent. We continue to be fascinated to see how people will use Lambda@Edge over the coming years. New features like Content-based Dynamic Origin Selection make deploying entire webapps — without web app servers — to a massively distributed CDN network a possibility.

Related services

Of course we weren't just interested in Lambda and API Gateway. Building real apps needs more than that. There are too many announcements to go through everything, but here are a few that stood out.

First up — Fargate — Amazon's answer to the idea of ‘Serverless containers’. This might be a very interesting combination of FaaS and Containers-as-a-Service, and we'll be sure to keep our eyes on it.

Serverless Aurora promises to be the SQL Database to partner with Lambda that we've been hoping for. It's still in early access, so no concrete news to report here, but a lot of people will be happy to be able to use a SQL database that has the operational properties of DynamoDB.

For those folks who are perfectly happy to stick with DynamoDB though they got a couple of large, and welcome, updates. Global tables, and backup/restore. Joy of joys!

AWS AppSync is a fully managed serverless GraphQL service” — we'll let GraphQL expert Steve Faulkner give you the outsider's view.

And finally, our favorite Serverless service that isn't Lambda or API Gateway — S3! S3 also got some love, including the new S3 Select feature.

What was missing

So yeah, there was a lot going on at re:Invent, and I've barely scratched the surface.

… but of course a good cloud architect is never satisfied and there were a few things missing that I hoped, and frankly expected, to see.

First, there were no updates from the X-Ray team. I talk a lot about how important solving the distributed monitoring problem is for FaaS, and Serverless as a whole. As such I was excited to see X-Ray introduced last year. But this year? Nothing. There have been some improvements since re:Invent 2016 but to see nothing announced at this re:Invent was very disappointing.

Next up — Step Functions. Step Functions got a small update a couple of weeks ago allowing for editing of state machines, but there was nothing new at re:Invent. And again, this is a problem. Lambda is not a good solution for handling long-running stateful processes, and Step Functions is effectively in the same place it was a year ago.

These were the 2 big misses. Smaller things I thought we might get, but didn't:

  • Websocket support for API Gateway. We've seen a lot of other API Gateway updates over the last month, and also App Sync may help here, so I'm not too upset about this one.
  • Ruby language support not announced, yet. Sad trombone for the rubyists. There's always Fargate for them, right?
  • SQS event source for Lambda. Not here yet, but I heard that some of the other platform improvements were a prerequisite for this, so maybe another time soon.

But it was still great!

That's enough whining from me, overall we saw a solid bunch of incremental improvements, with some exciting launches and announcements. To see even more of what was launched that might be exciting to Serverless folk I recommend this article from the good people at the Serverless Framework. Not only is this a useful resource now, they live-updated it during the week so that we could all keep our wits about us.

And finally, SAM the Serverless Squirrel has become the mascot for all things Serverless at AWS. Because of this, and some friendly Twitter banter, Tim Wagner who, remember, runs the biggest FaaS platform on the planet, went the extra mile and became SAM. Thanks Tim for providing a smile, as well as a raft of new product updates.

image

Need help with Lambda, or other Serverless technologies? We're the experts! Subscribe to our newsletter, and contact us at Symphonia for expert advice, architectural review, training and on-team development.