<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Joita Mitra on Medium]]></title>
        <description><![CDATA[Stories by Joita Mitra on Medium]]></description>
        <link>https://medium.com/@joita.mitra10?source=rss-2fc5afa75c2d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7m3fbwBFj6lihtay7IYd4w.jpeg</url>
            <title>Stories by Joita Mitra on Medium</title>
            <link>https://medium.com/@joita.mitra10?source=rss-2fc5afa75c2d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 13:25:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@joita.mitra10/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[GOING SERVERLESS WITH AWS LAMBDA]]></title>
            <link>https://medium.com/chefs-doeuvre/going-serverless-with-aws-lambda-4f307b1ca5a0?source=rss-2fc5afa75c2d------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f307b1ca5a0</guid>
            <category><![CDATA[serverless-architecture]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[technical]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <dc:creator><![CDATA[Joita Mitra]]></dc:creator>
            <pubDate>Sat, 12 Sep 2020 12:45:56 GMT</pubDate>
            <atom:updated>2020-09-12T12:45:56.413Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*Aum4mj9PWE5SoB-R_pjzkQ.jpeg" /></figure><h3><strong>WHAT IS SERVERLESS ARCHITECTURE?</strong></h3><p>Serverless architecture is a way to build and run applications and services without having to manage the infrastructure behind it. Serverless doesn’t mean that there is no server attached to your website or app. Your application still runs on servers, of course, but the server management is done by third-party vendors like AWS, Azure, and Google. You no longer have to provision, scale, and maintain services to run your applications, databases, or storage systems. With the serverless architecture, you can execute your code only when needed, and no longer need to keep your servers running at all times while also being able to scale automatically from a few requests per day to thousands of requests per second. And you only pay for the compute time you consume. There is no charge when your code’s not running.</p><h3><strong>So, why use serverless?</strong></h3><p>Well, serverless enables you to build modern applications with increased agility and lower total cost of ownership. Building serverless applications means that your developers can focus on their core product, instead of worrying about managing and operating servers, or runtimes, either in the cloud or on-premises.</p><p>This reduced overhead lets developers reclaim time and energy that can be spent on developing great products, with scale, and that are reliable.</p><p>Serverless has four main benefits.</p><p>1. <strong>No server management.</strong> There’s no need to provision or maintain any servers. There’s no software or runtimes to install, maintain, or administer. All of this is done for you by a third-party vendor.</p><p>2. <strong>Flexible scaling.</strong> Your application’s going to be scaled automatically by adjusting its capacity through toggling the units of consumption. For example, throughput or memory, rather than units of individual servers.</p><p>3. <strong>Pay for value.</strong> You pay for a consistent execution duration, rather than by the server unit. You do not require to run your servers 24x7.</p><p>4. <strong>Automated high availability.</strong> Serverless provides built-in availability and fault tolerance. You don’t need an architect for these capabilities since the servers running the application provide them by default. So now you can put in more time on developing your core product.</p><h3><strong>WHAT IS AWS LAMBDA?</strong></h3><p>AWS Lambda, introduced in 2014, is an event-driven, serverless computing platform provided by Amazon as a part of Amazon Web Services. It is a computing service that runs code in response to events and automatically manages the computing resources required by that code. It falls under the <strong>FaaS (Function-as-a-Service)</strong> category of serverless computing.</p><p>With AWS Lambda, you can run code for virtually any type of application or backend service — all with zero administration. AWS Lambda runs your code on a high-availability compute infrastructure and performs all of the administration of the compute resources, including server and operating system maintenance, capacity provisioning and automatic scaling, code monitoring, and logging. All you need to do is supply your code in one of the languages that AWS Lambda supports, namely Node.js, Python, Java, C#, Ruby, and Go. However, it is also possible to use your own custom runtime for Lambda.</p><h3><strong>FUNDAMENTALS OF A LAMBDA FUNCTION</strong></h3><p>Now that we know what AWS Lambda is all about let’s dive deeper. The next step is to create and upload our lambda function. Depending on what your code does, you may have to access other AWS services through Lambda. For this, you’ll be required to create an Identity and Access Management or IAM role. This role will allow you to do logging as you may need to troubleshoot your Lambda function. These logs will be automatically sent to the CloudWatch Logs service.</p><h4><strong>Triggers</strong></h4><p>At this point, you’ve successfully created your Lambda function. However, creating a Lambda function alone isn’t going to do much as it needs to be executed. These are called Triggers. There are many AWS services that can trigger a Lambda function such as, Simple Storage Service(S3), CloudFront, API Gateway, and many more. A trigger is a Lambda resource or a resource in another service that you configure to invoke your function in response to lifecycle events, external requests, or on a schedule. Your function can have multiple triggers. Each trigger acts as a client invoking your function independently.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*McZUczQVtLLR2Hl2Mg2Akw.png" /><figcaption>Simplified architecture of a running Lambda function</figcaption></figure><h4><strong>Handler</strong></h4><p>When you execute your Lambda function, it needs to know what part of your code it is required to execute. That is the entry point for your code also known as a “handler.” The handler tells Lambda in which file or class the function to be executed is, as well as its name. When you invoke a function, the runtime runs the handler method. When the handler exits or returns a response, it becomes available to handle another event. Every Lambda function begins with the handler:</p><pre>exports.handler = function(event, context, callback){}</pre><h4><strong>Event object</strong></h4><p>When your Lambda function is invoked, one of the parameters provided to your handler function is an event object. The contents of the event parameter include all of the data and metadata your Lambda function needs to drive its logic and differs for different event sources.</p><h4><strong>Context object</strong></h4><p>Your Lambda function is also provided with a context object. The context object allows your function code to interact with the Lambda execution environment.</p><h4><strong>Event Payload</strong></h4><p>Lambda will use the handler to execute your Lambda from the trigger it received, but your code probably needs to receive some more information about what just triggered it. That information is passed to the handler via what we call an “event payload.”</p><h4><strong>Types of Lambda Invocation</strong></h4><p>When a service like S3 invokes the Lambda function, there is no need for S3 to get return data from the function. It really doesn’t care about what Lambda does. That is what we call an “asynchronous invocation.” When you invoke a function asynchronously, you don’t wait for a response from the function code. You hand off the event to Lambda and Lambda handles the rest.</p><p>If we take another example where we have API Gateway that sends a request to Lambda for a REST API call, API Gateway is really interested in the response from Lambda to be able to send it back towards the user. That is what we call a “synchronous invocation.” When you invoke a function synchronously, Lambda runs the function and waits for a response. When the function execution ends, Lambda returns the response from the function’s code with additional data.</p><h4><strong>Managing Permissions</strong></h4><p>With Lambda, there are 2 types of permissions to be aware of. First, your code running in a Lambda function is granted permissions by using an IAM Role. Second, the service triggering your Lambda function can be granted the permissions to do so with a Lambda Function Policy. When configuring triggers using the AWS Management Console, the console will create the necessary Lambda Function Policy for you when you enable the trigger.</p><h3><strong>CONCLUSION</strong></h3><p>Building serverless applications on AWS relieves you of the responsibilities and constraints that servers introduce. Using AWS Lambda as your serverless logic layer enables you to build faster and focus your development efforts on what differentiates your application. Alongside Lambda, AWS provides additional serverless capabilities so that you can build robust, performant, event-driven, reliable, secure, and cost-effective applications.</p><p>I hope this post helped you understand the basics of AWS Lambda and the importance of serverless architecture.</p><p>Thanks for reading!</p><h4><strong>References</strong></h4><ul><li><a href="https://docs.aws.amazon.com/lambda/latest/dg/welcome.html">AWS Lambda Developer Guide</a></li><li><a href="https://d1.awsstatic.com/whitepapers/serverless-architectures-with-aws-lambda.pdf">Serverless Architecture with AWS Lambda Whitepaper</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f307b1ca5a0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/chefs-doeuvre/going-serverless-with-aws-lambda-4f307b1ca5a0">GOING SERVERLESS WITH AWS LAMBDA</a> was originally published in <a href="https://medium.com/chefs-doeuvre">Alexa Developers SRM</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>