2022 in Serverless
Tags: serverless, recap, 2022
Published: 2022-12-28 15:18:14


On January 4th, I announced the [tech word of the year was **async**](https://dev.to/aws-builders/and-the-2022-word-of-the-year-is-58ab). 

For me personally, I was prepared for a year of education on event driven architectures. I was determined to go full-swing at work into [202 status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/202) and background processes.

The [architectures I designed](https://dev.to/aws-builders/introducing-a-new-cross-cutting-architecture-diagram-the-critical-path-4948) were loosely coupled and relied on EventBridge for service to service communication. I even wrote [a full series on WebSockets](https://dev.to/aws-builders/intro-to-aws-websockets-306p) demonstrating how to keep your UI updated while you wait for background tasks to run.

Needless to say, I was fully invested in the theme of the year. And I wasn't the only one. 

The serverless community was also focused on promoting asynchronous development. Over the course of the year we had countless events, service announcements, blog posts, videos, and podcasts that all advocated for the benefits of async. Then of course, we had the icing on the cake at re:Invent in [Dr. Werner Vogel's](https://twitter.com/Werner) keynote.

![Dr. Werner Vogel stating the world is asynchronous](https://readysetcloud.s3.amazonaws.com/2022_in_serverless_1.jpg)

I'm a good guesser, apparently. **Asynchronous** seemed to be the theme of the industry in 2022. 

Let's talk about some of the serverless highlights from the year that enable asynchronous behavior and other updates that are just plain cool.

## Service Updates

What better way to start our serverless recap than by reviewing some of the amazing features that were released this year! There were countless updates released across the serverless ecosystem and it would be impossible to list them all. So I'm going to give you a recap of some of the bigger serverless services in AWS.

### EventBridge

[EventBridge](https://aws.amazon.com/eventbridge/) is the glue that ties so many AWS services together. 2022 was a great year for this service, as it opened the door to thousands of new use cases with some huge updates.

* [S3 event notifications](https://aws.amazon.com/blogs/aws/new-use-amazon-s3-event-notifications-with-amazon-eventbridge/) - Many background processes are kicked off when a file is uploaded to a site. EventBridge made it dirt simple to kick off Step Function workflows and Lambda functions by firing an event on upload.
* [Enhanced filtering](https://aws.amazon.com/about-aws/whats-new/2022/11/amazon-eventbridge-enhanced-filtering-capabilities/) - Speaking of triggering workflows from file uploads, we now have the ability to create EventBridge rules with content-based filtering on suffixes. This means we can trigger workflows when certain file types are uploaded in the system. We also got case-insensitve matching and "OR" conditions. 
* [CloudFormation event notifications](https://aws.amazon.com/about-aws/whats-new/2022/07/aws-cloudformation-event-notifications-amazon-eventbridge-event-driven-applications/) - In an effort to trigger workflows on as many events as possible, support was added for CloudFormation. You can trigger rules when a stack resource changes, the stack status itself changes, or when drift detection status changes. This is great for platform engineers to closely monitor and react to changes in the infrastructure. 
* [EventBridge Pipes](https://aws.amazon.com/about-aws/whats-new/2022/12/amazon-eventbridge-pipes-generally-available/) - Now we can connect services seamlessly without "Lambda glue". Pipes enable point-to-point integrations of countless services and even offer a way to transform and enrich content prior to getting to the destination. 
* [Scheduler](https://aws.amazon.com/about-aws/whats-new/2022/11/amazon-eventbridge-launches-new-scheduler/) - One of the big missing native features in AWS for a long time has been the ability to schedule a task to run at a specific time. Many home-grown solutions have been made to schedule events, but they often were imprecise or wasted compute. But that all changed when the scheduler came out. EventBridge now has the ability to add one-off or recurring schedules to kick off a task. You can start a task in over 200 different services, so again we avoid the "Lambda glue" to start an async workflow.
* [Patterns on ServerlessLand](https://serverlessland.com/patterns?services=eventbridge-pipes) - If you didn't already have it bookmarked, it's time to save Serverless Land to your favorites. This site is maintained by the AWS Serverless DA team and is an incredible resource for best practices and sample code. They even added an entirely new section to the site for community shared code called *snippets*. This site has been invaluable to see some practical examples that keep up with the many releases of our favorite services, EventBridge included.

You can see the focus from the EventBridge team has been "connectivity". Between adding new native events from services like S3 and CloudFormation, to enabling consumers to tie virtually all services together with pipes, to triggering async events as a one-off or on a schedule, asynchronous development has been fully embraced. 

### Step Functions

Step Functions is [one of my favorite AWS services](https://dev.to/aws-heroes/success-with-step-functions-finding-a-way-to-build-that-doesnt-suck-27p3). It provides a way of building meaningful, orchestrated workflows in a serverless environment. Over the course of the year, I ran an experiment [pitting it against Lambda](https://dev.to/aws-builders/lamba-vs-step-functions-the-battle-of-cost-and-performance-lim) to compare cost and performance. 

This service is completely different than it was in January of this year. Here are some of the game changing features that were released to take our workflows to the next level.

* [Local mocking](https://aws.amazon.com/about-aws/whats-new/2022/01/aws-step-functions-support-workflows/) - A big complaint I saw regularly was the inability to test Step Functions locally. You were required to deploy to the cloud to test. This capability gives us some support for local testing, *although nothing beats testing in the cloud*. [Yan Cui](https://twitter.com/theburningmonk) even showed us how to [use it with end to end testing](https://theburningmonk.com/2022/12/a-practical-guide-to-testing-aws-step-functions/) to fully test your workflows.
* [New intrinsic functions](https://aws.amazon.com/about-aws/whats-new/2022/08/aws-step-functions-14-new-intrinsic-features-process-data-workflows/) - If I can get away from using a Lambda function in lieu for a Step Function workflow, I will always take it. The addition of 14 new intrinsic functions enables a multitude of new use cases that formerly required a function. These updates included some array manipulation and the much anticipated `States.MathAdd` and `States.UUID` functions!
* [Visual view for express workflows](https://aws.amazon.com/about-aws/whats-new/2022/10/aws-step-functions-adds-new-execution-observability-features-express-workflows/) - A big detractor for me from express workflows was the inability to view executions like you could with standard workflows. Browsing state machine execution logs never felt like a production-ready feature. But in October of this year we got a very similar experience to standard workflows, elevating the viability of express workflows tremendously.
* [Large scale parallel processing](https://aws.amazon.com/about-aws/whats-new/2022/12/aws-step-functions-large-scale-parallel-workflows-data-processing-serverless-applications/) - Up until recently, you could run up to 40 concurrent parallel iterations in a state machine. This led to some [interesting design patterns](https://dev.to/aws-builders/3-reasons-you-should-stay-away-from-aws-step-functions-2hke) when you were iterating over thousands of records. Now it has full support for high volume use-cases with distributed mapping. 

With these updates, it feels like the Step Functions team was focused on expanding use cases to increase adoption. In my opinion it was already a great service and the team has done some tremendous work making it even better. I'd like to see a similar experience to [AWS App Composer](https://aws.amazon.com/application-composer/) come to the workflow studio to help address the remaining DevEx issues (*hint, hint, dev team*).

### Lambda

A post isn't about serverless until you mention Lambda. There were so many updates to this service in 2022 it would be an entire post in itself to cover them all. Here are some of the important ones.

* [Increased ephemeral storage](https://aws.amazon.com/blogs/aws/aws-lambda-now-supports-up-to-10-gb-ephemeral-storage/) - Early this year Lambda received an update that allows you to configure up to 10GB of ephemeral storage for a given function. This opens up some use cases for ETL jobs that need to load large files. Prior to this you could load large files into memory and subsequently be billed for it.
* [Tiered pricing](https://aws.amazon.com/about-aws/whats-new/2022/08/aws-lambda-tiered-pricing/) - We all know serverless services are pay for what you use. But when you [reach a certain scale](https://dev.to/aws-heroes/when-is-serverless-more-expensive-than-containers-58k1) it might become a little cost prohibitive. AWS now gives a bulk discount to high volume Lambda users. It's a great start at price fixing for giant scale and I hope to see this expanded a little bit in 2023.
* [Function URLs](https://aws.amazon.com/about-aws/whats-new/2022/04/aws-lambda-function-urls-built-in-https-endpoints/) - Sometimes you just wish you could invoke a function directly instead of going through the rigamarole of setting up API Gateway in front of it. With function URLs, you can do just that. These can be open to the public or authenticated via IAM. It's a neat feature for rapid testing or webhooks.
* [Secrets Manager and SSM Extension](https://aws.amazon.com/about-aws/whats-new/2022/10/aws-parameters-secrets-lambda-extension/) - Hopefully you aren't storing secrets as environment variables in your functions. Ideally they should be stored in Secrets Manager. This accepted best practice got a latency decrease with the release of a Lambda extension that loads and caches secrets and parameters.
* [SnapStart](https://aws.amazon.com/blogs/aws/new-accelerate-your-lambda-functions-with-lambda-snapstart/) - Java functions received a big boost to [cold starts](https://dev.to/aws-heroes/lets-stop-talking-about-serverless-cold-starts-39ae) with the SnapStart feature. Lambda will initialize your execution environment, take a snapshot of it, then use the snapshot in future invocations to reduce initialization time. It's a great idea and I look forward to seeing how it develops as they release support for other runtimes. 

Looking at these features, I'd guess the primary goal of the Lambda team was to reduce consumer costs. Everything listed above affects cost to some degree (except SnapStart). I love the initiative the team is putting forward to make the cloud more affordable for everyone.

## Identity Crisis

We've seen serverless go through a bit of an identity crisis this year. Between the release of [Neptune serverless](https://aws.amazon.com/neptune/serverless/) and [OpenSearch serverless](https://aws.amazon.com/opensearch-service/features/serverless/) it seems like AWS might not even know what it means.

I wrote about the heated online debates we're seeing in a [tongue-in-cheek post](https://dev.to/aws-heroes/i-dont-know-what-serverless-is-anymore-k3a) talking about some fundamental principles of serverless.

I tend to agree with [Momento](https://gomomento.com) on their definition of serverless.

![Serverless litmus test](https://readysetcloud.s3.amazonaws.com/2022_in_serverless_2.png)

We'll see how things shake out in 2023 with the definition of serverless and if AWS course corrects with their definition for Neptune and OpenSearch.

## Leaping Ahead

There was a lot of attention on something new in the serverless realm: *Infrastructure from Code (IfC)*. 

The concept has been around for a few years, but awareness really started taking off this year. The gist behind IfC is that you *just write code*. IfC frameworks take the burden of infrastructure decisions away from consumers and enable them to focus only on business logic. 

Decisions like "should this be a DynamoDB table with a GSI" and "would this be better suited as a Lambda function or in App Runner" are made by these frameworks and managed completely independently. It's a novel concept and I [formed some quick opinions](https://dev.to/aws-heroes/infrastructure-from-code-my-first-impression-4hlh).

I dove deep into the concept, trying out a few frameworks [in a benchmark test](https://dev.to/aws-heroes/the-current-state-of-infrastructure-from-code-1fjc). The more I used it, the more I accepted the fact that it was ok for someone else to make infrastructure decisions for me. 

I feel like we have a long way to go before that opinion is mainstream but I am excited to see what's in store for us with IfC.

As we enter a new year I am left wondering - *is IfC serverless or is it something else entirely?*

## Important Newcomers

Along with the big updates to the services we know and love there were some newcomers into the field.

* [Momento](https://gomomento.com) - This startup offers a fully serverless cache - which was a huge gap in the serverless space. Existing services like Elasticache require provisioning of resources that you pay for all the time - even when not in use. Momento is here to change that. They offer a *pay for what you use* model and can be implemented with literally 5 lines of code.
* [BaseLime](https://baselime.io/) - There are lots of observability and APM vendors out there, but BaseLime is looking to change the game. They offer *Observability as Code* and target serverless applications directly. BaseLime seeks to promote observability best practices which is a welcomed attitude and something I feel is [missing in the industry today](https://readysetcloud.io/blog/allen.helton/build-an-observability-mindset). They are currently in public beta and are absolutely worth investigating.
* [Ampt](https://getampt.com/) - Formerly known as Serverless Cloud, Ampt broke off from Serverless, Inc earlier this year to focus on Infrastructure from Code. It is not current available for public use, but if you want to get a sneak peak - rumor has it it will have a very similar feel to what is currently offered today with Serverless Cloud.
* [AWS Application Composer](https://aws.amazon.com/application-composer/) - This new AWS service allows users to build SAM templates visually in their browser. The service connects directly to a local template file on your machine and updates it in real time. It even has the ability to edit existing template files, meaning you can use it immediately if you've been building your applications with SAM. It's a great attempt from AWS to take some of the burden off of IaC management.

## Summary

2022 was a big year. We had some major service updates that make our code more concise and noticeably less expensive. Some of these major features will open doors to significant opportunities we haven't even imagined yet ([and some we have](https://serverlessland.com/patterns/eventbridge-pipes-ddbstream-with-filters-to-eventbridge)).

Serverless is being adopted at an increasingly high rate, but that might be what's causing it to have an identity crisis. The word "serverless" has become so buzzword-y that it's being slapped on everything in an effort to gain adoption. It means a lot more than *I don't manage servers*. There are certain capabilities a service needs to provide in order to be seen as serverless. We might need to wait for the dust to settle before re-emerging with a new definition.

Serverless development is going to change in the not too distant future and Infrastracture from Code vendors know it. They are putting tons of effort into finding the right abstractions that take infrastructure decisions away from the developers - in a good way. If you haven't tried one of these frameworks yet, it's about time to get your hands dirty.

There are infinite possibilities coming to the cloud. We've built a "native cloud" expertise among the serverless community and it's continuing to up the bar month after month. If 2022 was any indicator of what the industry can do, I look forward to being in a constant state of shock next year.

we are moving at break-neck speed. If you want to a filtered list of what's happening with serverless, be sure to [subscribe to my newsletter](https://readysetcloud.io/newsletter) for weekly updates.

Here's to an amazing year! You all are amazing.

Happy coding!