So for the people who don’t know what service-oriented architecture is, a design pattern based on distinct pieces of software providing application functionality as services to other applications via a protocol. This is known as service-orientation. It is independent of any vendor, product or technology.

In simple words, different components of software, minimally dependent on each other, work & interact using well defined interfaces to perform a specific function.

Now as my blog title says, AWS Lambda is the next evolution in SOA (Service Oriented Architecture), you might be wondering what made me ponder on the topic.

To understand this lets take up a simple use case.

Why AWS Lambda?

What do you do if you want to listen to change events from any part of your infrastructure and react to those events in a timely manner?

The  closest service that could serve the purpose of event driven architecture till now was CloudTrail, the only service responding to the events. CloudTrail could be used to record AWS API calls and publish a notification for each log file by Amazon Simple Notification Service (SNS), after which one could take an action upon the log file delivery.

So Amazon realized this and as Vogel calls the solution “the easiest way to compute in the cloud” announced AWS Lambda.

AWS Lambda is a service that runs your code in response to events and automatically manages the compute resources for you, making it easy to build applications that respond quickly to new information. It runs on Amazon Linux AMI (Version 3.14.26–24.46.amzn1.x86_64). The functions of AWS Lambda are stateless due to which they can scale rapidly.

How can we compare it with SOA (Service-Oriented Architecture)?

Moving forward, the question still remains unanswered as to how we can relate this to SOA. Well, let’s take an example:

Suppose you want to process some image as soon as it is put into the bucket ; traditional method includes ; writing a program that keeps checking for a new file in the bucket ( to be done by the developer ). Looks like a tedious job!

What if this is taken care-off, by AWS itself ! This is what AWS Lambda does for you. Lambda as described above, takes actions based on such events. Lambda will run the user defined function ( written in Node.js ) in response  to the events taking place in S3.

Comparing the above scenario with SOA – Here AWS Lambda helps decouple the components and act as independent services working in tandem with each other to achieve the single goal of the application.

How is AWS Lambda different from other AWS Services?

  • AWS Lambda doesn’t deal with VMs, the way developers deal with provisioning, configuration, monitoring, managing & maintaining VMs with Amazon EC2. Lambda is just a plain code written in the editor where DevOps can only monitor logs.
  • Unlike Amazon EC2 container service where the DevOps manage the container lifecycle, there is no container maintenance required for Lambda.
  • When we compare Lambda with Elastic Beanstalk, Amazon Elastic Beanstalk being the PaaS layer is exposed to the outside world where developers push the code along with meta data. On the other hand Lambda functions are inaccessible from the public internet and the configuration and meta data are much simpler and consistent across any Lambda function.

Features of AWS Lambda

  • With AWS Lambda you don’t have to provision your own instances. Lambda performs all the operational and administrative activities on your behalf.
  • AWS Lambda provides 99.99% availability for both the service and for the functions.
  • AWS Lambda is priced on a pay per use basis.
  • So far, AWS Lambda can respond to events from Amazon S3, Amazon DynamoDB & Kinesis.
  • AWS Lambda secures the user’s code by storing it in Amazon S3 and encrypting it. It also performs integrity checks while the code is in use.

In the end, I would summarize it as an event-driven compute service that will in no time become the next evolution, and as Marco Argenti, Vice President, Mobile, Amazon Web Services says “AWS Lambda changes the way developers design and scale their dynamic applications in the cloud”.

References:

  1. How AWS Lambda is different from other AWS Services?
  2. Features of AWS Lambda
  3. Why AWS Lambda?
  4. Definition of  SOA?

Tags: , ,