What new use cases do the re:Invent 2018 serverless announcements open up?
Tags: lambda, serverless, aws, reinvent
Published: 2018-12-03 21:01:14

---
title: "What new use cases do the re:Invent 2018 serverless announcements open up?"
tags: Lambda, Serverless, AWS, reInvent
description: "A look at the key announcements from the 2018 AWS re:Invent conference and how they affect the serverless space."
canonical_url: https://winterwindsoftware.com/aws-reinvent-2018-serverless-review/
cover_image: https://winterwindsoftware.com/img/blog-images/aws-reinvent.png
published: true
---
The 2018 AWS re:Invent conference has just finished. If, like me, you were unfortunate enough not to get to Vegas, you may having been following it closely on [Twitter](https://twitter.com/hashtag/reinvent?src=hash) with an acute case of FOMO.

There were many exciting announcements (comprehensive list [here](https://serverless.com/blog/reinvent-2018-serverless-announcements/)), so many in fact that I  felt slightly overwhelmed trying to figure out what it all means for the future cloud development landscape.

So I took a few hours today to go through the multitude of conference blog posts with a view to answering the following questions:
- What type of apps/workloads would this new thing work well with?
- Should (and how would) I migrate my (or my clients') existing apps to use this new thing?
- Does this new thing enable developers or organisations who previously didn't feel ready to use serverless to reconsider?

Let's dive in to the main announcements...

## Lambda now supports _any_ programming language and reusable libraries via "Layers"
This is a huge boon for large web dev communities such as Ruby and PHP who will now be treated as first-class citizens when running their functions in the cloud.
While I don't expect an immediate mass influx (frameworks such as Rails and Laravel aren't a good fit for Lambda), I do expect to see many developers trying out small use cases (e.g. building a Lambda website contact form) and new workflows and libraries/frameworks growing from there.

The multi-language support works via a new feature called __[Lambda Layers](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html)__. Layers will also deliver benefits to those of using an already supported language. While previously a function was the sole unit of deployment, layers now provide dependent artifacts, in a similar way that AMIs do for EC2 instances. The [official blog post](https://aws.amazon.com/blogs/aws/new-for-aws-lambda-use-any-programming-language-and-share-common-components/) states that you can now:

> - Enforce separation of concerns, between dependencies and your custom business logic.
> - Make your function code smaller and more focused on what you want to build.
> - Speed up deployments, because less code must be packaged and uploaded, and dependencies can be reused.

This looks good-to-go as the [Serverless Framework already supports using Lambda Layers](https://serverless.com/blog/publish-aws-lambda-layers-serverless-framework) 💪, so I expect to be trying it out very soon for things such as making FFmpeg commands from inside a function.

I can see potential for misuse of Lambda Layers and expect that best practices will emerge on their use. I'm not the only one:

{% twitter 1068597099640643585 %}

## Easier migration to Lambda architecture from EC2/containers via Application Load Balancer
Application Load Balancers [now support Lambda functions as their targets](https://aws.amazon.com/blogs/networking-and-content-delivery/lambda-functions-as-targets-for-application-load-balancers/).
On the face of it this may seem a strange pairing as Lambda functions are usually invoked from API Gateway in web API-based use cases. In a greenfield serverless project, you probably wouldn't go near ALBs. However, if you have an existing EC2-based web app which runs behind an application load balancer, then migrating to Lambda can be a huge task.

This new capability allows you to migrate away from your existing app architecture in tiny chunks. Such a chunk could be as small as a single verb on a single route on a single endpoint. For example, you would just write and deploy a new Lambda function which implements the `GET /api/accounts/:account_id/products` route, and then configure it to be triggered from your existing load balancer. You wouldn't touch your existing production app code at all. Rinse and repeat for your remaining API routes until your server goes away!

This is available immediately with no pricing impact on top of the usual ALB and Lambda charges.
My own SaaS product still uses a container-hosted Express.js API behind an ALB for its back-office portal which I've been meaning to move to Lambda for ages. With this announcement, I now have a low-risk way of beginning a staged migration process 👍.

📖  __*Related: [How to calculate the billing savings of moving an EC2 app to Lambda](https://winterwindsoftware.com/ec2-to-serverless-migration-calculator/)*__

## Lambda VPC cold starts should be improving
I was sort of hoping for more than this, but it seems that AWS will be releasing something in 2019 to help address a deal-breaker for many — the sloooow cold start time of VPC-enabled functions:

{% twitter 1068272580556087296 %}

📖  __*Related: [Scaling Lambdas inside a VPC](https://winterwindsoftware.com/scaling-lambdas-inside-vpc/)*__

## Aurora Serverless Data API
A particular use case which is affected by VPC cold starts is connecting to a relational database inside RDS. However, with the announcement of the [Aurora Serverless Data API](https://aws.amazon.com/about-aws/whats-new/2018/11/aurora-serverless-data-api-beta/), you can now make calls to your database over HTTP rather than over the native SQL protocols. This will have 2 key benefits:
- You don't need to connect your Lambda to a VPC, so won't experience slow cold starts
- Since it's just a HTTP API, you no longer need to worry about dealing with SQL connection issues that Lambda functions (being effectively stateless) suffer from

This is still in beta and only supports MySQL right now so you won't want to use it in production just yet.
[Jeremy Daly](https://twitter.com/jeremy_daly/) posted a great in-depth [first look](https://www.jeremydaly.com/aurora-serverless-data-api-a-first-look/) article if you'd like to explore further. He found that the performance is pretty poor right now (it is a beta after all), but is hopeful this will improve as the service matures.

## DynamoDB On-Demand
DynamoDB has always been touted as the go-to database for serverless applications in the AWS ecosystem. However, I've always felt it fell slightly short of [many people's definition of serverless](https://winterwindsoftware.com/serverless-definitions/), in that you still have to do some capacity planning and setup auto-scaling rules. I've been stung in the past by throttling of under-provisioned tables.

However, with the announcement of [per-request billing](https://aws.amazon.com/blogs/database/amazon-dynamodb-related-content-from-aws-reinvent-2018/), DynamoDB's scaling is much more on auto-pilot again. It will probably require some calculations on your part to plan your future costs before switching over, but this is much more inline with the Lambda pay-for-what-you-use billing model and reduces the need to over-provision read and write capacity to handle busy periods.

[There's already an article](https://medium.com/@softprops/putting-dynamodb-scalability-knobs-on-auto-pilot-3af8520439c9) showing you how to turn this on using the Serverless Framework.

## A Netlify alternative
The new [AWS Amplify Console](https://aws.amazon.com/about-aws/whats-new/2018/11/announcing-aws-amplify-console/) was released and it seems to be in the same space as Netlify:
> "The AWS Amplify Console is a continuous deployment and hosting service for modern web applications with serverless backends. Modern web applications include single page app frameworks like React, Angular, and Vue, and static-site generators like Jekyll, Hugo, and Gatsby."

I use 5 of the above 6 mentioned technologies and love a simple, automated dev workflow. I'll definitely be checking this out.

## Other items to keep an eye on
I've covered what I believe to be the major serverless news items, but there were a few other announcements worth mentioning:
- You can now [use transactions to update your DynamoDB tables](https://aws.amazon.com/blogs/database/amazon-dynamodb-related-content-from-aws-reinvent-2018/)
- A new fully managed time series database called [AWS Timestream](https://aws.amazon.com/timestream/) was released. Could see this being useful for click-stream analytics.
- API Gateway now supports web sockets:
{% twitter 1068201861998465024 %}

[AWS Outposts](https://aws.amazon.com/outposts/) ~~empowers fools to run their own hardware~~ _"bring native AWS services, infrastructure, and operating models to virtually any data center, co-location space, or on-premises facility."_ 🤨

[AWS Firecracker](https://aws.amazon.com/blogs/aws/firecracker-lightweight-virtualization-for-serverless-computing/) was announced as a _"Lightweight Virtualization for Serverless Computing"_. There was quite a lot of excitement about this on Twitter, but I was bit "meh" as it's too low in the stack for me to consider using it. However, if having the fallback option of being able to run your own FaaS execution environment helps to lower the perceived lock-in of using Lambda in conservative-minded organisations, then this could be a good thing.

## Wrapping up

There are many other new products and features I haven't mentioned if you want to take a look for yourself through the [full list](https://serverless.com/blog/reinvent-2018-serverless-announcements/).

To round things up, these announcements have solidified my belief that serverless is the future for building apps and is the path I would recommend any greenfield project start out on. And the migration path for existing apps is making switching to serverless a realistic option.
 Dealbreakers are being solved and barriers to entry are being lowered.

This tweet from [Simon Wardley](https://twitter.com/swardley) sums it up nicely:
{% twitter 1068237051584233472 %}

---
💌 __*If you enjoyed this article, you can sign up [to my weekly newsletter on building serverless web apps in AWS](https://winterwindsoftware.com/newsletter/).*__
You also might enjoy:
- [Concerns that serverless takes away](https://winterwindsoftware.com/concerns-that-serverless-takes-away/)
- [Case studies of AWS serverless apps in production](https://winterwindsoftware.com/real-world-serverless-case-studies/)
- [The differing definitions of “serverless”](https://winterwindsoftware.com/serverless-definitions/)

_Originally published at **[winterwindsoftware.com](https://winterwindsoftware.com/aws-reinvent-2018-serverless-review/)**_.