AWS Lambda Extensions - More power to Serverless Computing
Syed Saifullah ??
AI/ML | Cloud Computing | Strategy and Consulting | Certified AI/ML and Cloud Specialist | Expertise across the complete AI/ML lifecycle, from ideation & development to deployment and monitoring.
Serverless computing is getting adopted across the landscape from startups to large enterprises. One of the matured and popular serverless compute platform is AWS Lambda. Microsoft equivalent for AWS Lambda is Azure functions.
A very useful feature released last year is?AWS Lambda extensions.
Before I explain AWS Lambda extensions, a quick take on Serverless computing. Serverless computing refers to running your application without provisioning or managing servers. You don’t provision servers , scale up or down for performance , monitor them, etc. All these are taken care of by the serverless computing service.
Why use AWS Lambda? With AWS Lambda you focus on building the code and deploying it. AWS Lambda takes care of server provisioning , upgrading or downgrading config as required and shutting down after use. You pay only for the time your code runs.AWS Lambda supports a variety of languages including Python, Node.js and Java.
There are some constraints though. Serverless computing brings its own set of challenges. You can’t check the performance , bottlenecks or issues in your code runtime environment since it is not accessible to you.
Various metrics like code runtime duration, resources used , part of code that is taking more time,etc is essential. This is where the recent addition of AWS Lambda extensions come into play.
AWS Lambda extensions integrate Lambda with tools for monitoring, security, and governance. Lambda extensions are available from AWS and other providers like AppDynamics, Check Point, New Relic, Datadog, Site24x7, etc.Monitoring of lambda functions is also possible using approaches like cloud watch and integrating handlers in your code to publish metrics.
These approaches were not simple and required extra configuration tasks. Lambda extensions make it easier to integrate 3rd party and AWS tools into lambda. Using these extensions you can collect the runtime metrics you need.
Benefits of using AWS Lambda extensions.
领英推荐
An extension can be internal or external. Internal runs as part of your function runtime process and ends along with your function. An external extension runs as an independent process in the same environment. It continues to run even after the function is processed.
Performance impact. One of the key points to be aware of is that extensions share your functions resources such as CPU, memory and storage. There is a possibility extensions can impact the performance of your function.
Each extension must complete its initialization before Lambda invokes the function. So a Lambda extension that has long initialization times can increase the time taken for function invocation.
If your extension is compute intensive then your function takes more time to complete and you will also incur more charges. So ensure that you measure the impact of the extension and decide if it is fine or you need to adopt a different approach.
Conclusion. Have you put off Serverless computing thinking it is complex and requires lots of learning ? Not at all. Give it a try and you will be surprised at how easy it is to get started and achieve great benefits. More so considering you continue to use your favourite languages like Python , Node.Js , Java,etc.
Need expert inputs or support on AWS, Azure or GCP ???Click here?to get it.
Struggling with Cloud costs? Checkout the?whitepaper?here on how you can reduce your cloud costs by upto 25%.