Going Serverless – is it time to make the switch?
The recent economic crisis has forced many businesses to tighten their budgets and closely monitor their spending. One solution to help reduce rising cloud costs and simultaneously increase efficiency, is to adopt and implement serverless solutions. Moving to a serverless model requires a complete shift in deployment and understanding for anyone who isn’t familiar with architecting, or the various Amazon offerings available. Careful planning and consideration are required to enable businesses to reap the full benefits of serverless technology.
What is Serverless?
Serverless is a way to build and run applications and services, without having to manage infrastructure. Instead of deploying an application to a specific server, the application is deployed to a cloud provider that dynamically allocates the necessary resources to run the application. This means that developers don’t need to worry about capacity planning, scaling, or maintenance of the underlying infrastructure, as it's handled by the underlying serverless technology. Implemented correctly, this can lead to vast cost savings and improved efficiency across the board.
To help lower the barrier to entry, Amazon have recently released AWS Application Composer that allows architects and developers to visually build serverless applications. Application Composer provides users a way to both document application architecture and perhaps more crucially for some, generate a CloudFormation template.
These infrastructure-as-code files can then be used in conjunction with AWS SAM, to provide users a seamless way to test and deploy their serverless applications to AWS. One particularly useful feature of Application Composer is that it sets useful defaults for resources that may be overlooked, such as security settings. These defaults can be overridden in the CloudFormation template or using the visual builder. If you’re interested in learning more, Amazons' own Serverless Land has plenty of patterns and snippets to help get you started.
At the 2022 AWS re:Invent (read more on the AWS re:Invent here), Werner Vogels – AWS Chief Technology Officer put a large emphasis on drawing parallels between the natural world and cloud computing, during his keynote speech.
Werner focused on how the natural world is asynchronous and the benefits we can achieve through also designing our systems to cater for asynchrony. He explained how decoupling systems allows for an architecture that can evolve and scale more easily, enabling more resilient, fault-tolerant designs.
How could event driven architecture look?
Extending upon the serverless paradigm, Event Driven Architecture is a pattern to design your applications to fully take advantage of the serverless platform. An example could be a typical e-commerce site that consists of a number of individual services; product catalogue, shopping cart, payment processing and order fulfilment. If you wanted to add a reporting service to find out the best-selling products, you'd have to redesign the application to fit in the new service. This can be time consuming and in turn, introduce catastrophic issues that both come at an extreme cost.
When comparing this to event-driven architecture, here the application is instead designed to respond to specific events such as a user uploading a file, or a system generating data. These events trigger the execution of a serverless function, that performs a task in response to the event. For example, a call to an API might be triggered by an event to process an image file and store it in a cloud storage service.
Event Driven Architecture isn't a new concept however, it has been drastically simplified due to recent innovations in the space. Amazon recently announced improvements to key services for building event driven applications including Amazon EventBridge Pipes, that provides a much simpler way to integrate existing serverless services via Amazon EventBridge. Pipes helps event-driven applications become more cost-effective by only processing events of interest through event filtering, in oppose to consuming each event independently.
Getting started with serverless doesn't have to be as daunting as you think. Even though it requires a shift in mindset to achieve the outcome you're looking for, it will also unlock capabilities that are often difficult when using traditional methods. Amazon has made it easier than ever to get started through introducing tools and features such as AWS Application Composer, Amazon OpenSearch Serverless and Amazon EventBridge Pipes.
If you are interested in switching to serverless, find out more and speak to the team today: firstname.lastname@example.org