Demystifying AWS Lambda Invocation Types

<p>In the realm of serverless computing, AWS Lambda has emerged as a cornerstone technology. Its ability to run code without the hassle of setting up and managing servers has transformed the way we develop applications. However, like any powerful tool, understanding its nuances is crucial. In this article, we&rsquo;ll break down the different ways AWS Lambda functions are triggered and executed, making it easier to understand.</p> <h1>Understanding Invocation Types:</h1> <p>AWS Lambda offers three distinct invocation types, each catering to specific scenarios.</p> <h2>How Event Source Mappings Work:</h2> <ul> <li>ESM&#39;s role is similar to dedicated observers, It is constantly on the lookout for fresh data from specific sources, such as queues or streams.</li> </ul> <p><strong>Here&rsquo;s how they operate:</strong></p> <ul> <li>ESM pool the sources, regularly checking for updates.</li> <li>When they spot something new, they gather it up in batches.</li> <li>These batches of data are then gracefully dispatched to Lambda, following the batch configuration set in your Lambda function.</li> <li>It&rsquo;s important to note that each batch triggers a Lambda invocation, so your Lambda function should be designed to handle all events within a batch comfortably, adhering to the 15-minute timeout limit.</li> <li>In the realm of ESM, AWS Lambda doesn&rsquo;t receive events as soon as they arrive, as with Asynchronous Invocation. Instead, Lambda takes on the role of an active investigator, proactively checking for any new data emerging from these sources. To perform this task, Lambda requires the appropriate IAM permissions in the Lambda execution role.</li> <li>This is where Event Source Mappings shine, bringing a range of AWS services like Kinesis, SQS Queue, and DynamoDB Streams into the realm of event-driven serverless architectures.</li> </ul> <p>&nbsp;<a href="https://medium.com/@vigneshdayalan/demystifying-aws-lambda-invocation-types-f2ab088c7a23">Visit Now</a></p>