In this section we are going to learn Ada Lovelace, Lambda working with events and ADA Islam, the
base practices and event driven architectures.
So let's get started.
Abdoulaye Islam is very good fit with the event driven architectures because the nature of the lambda
executions triggered from events.
Events can come loads of the resources unable to trigger lambda functions.
A Duelist Lambda is a complete service that runs custom function code and returns response to the events.
Most advantageous sources generate events for communicating each other, and most of the services are
event sources for lambda functions.
A do list.
Lamda always handle all the interactions with the Lambda API and there is no direct invocation of functions
from outside to service.
We can also see in the image on the slide lambda handle the events with the Lambda API.
The main purpose of lambda function is handle the events when a function is triggered by an event.
This is called an invocation.
Lambda function are limited to 15 minutes in duration, but on average most calls take less than a second
across all eight customers.
In some compute instead of operations, it may take several minutes to process a single event, but
in most cases the time is short.
An event triggering a lambda function could be almost anything you can see in the image from the rest.
API http request with Amazon API Gateway Schedule Task Management by Amazon Event Rule or Amazon S3
notification like object uploaded in the bucket.
Even the simplest lambda based application use at least one event.
So that's why we set that.
A lambda is very good fit for event driven architectures because the full of the lambda is events.
The event is adjacent object that contains all information about what happened.
Events are represents a change in the system state they are immutable so we can see the example event
JSON to trigger a lambda function in the slide image.
The first parameter of every lambda handle function contains the event JSON object.
So here you can find the example event JSON object that triggered to lambda function.
You can see the function image that that takes event parameter into lambda 100 method.
So at that stage, the event parameter is very important when developing your lambda functions.
If we look at the Lambda 100 method, we will see that the first parameter is event into lambda handed
method.
So with using this event JSON object, we can access the event parameters into the lambda function.
For example, let's look at the slide image we have.
We have new order event triggers to lambda function.
So if I would like to get the order that detail attribute value into lambda function, basically I can
take information with the event, that source event to detail.
We can use these attribute information reachable from the event dot notation.
So as you can see that we can reach the event at source and event that detail from the event object
of the lambda parameters lambda 100 function.
We can reach these entities because lambda triggered with this event JSON object with passing parameter
into another method.
An event could be custom generated from another microservices such as Native Order generated in the
ecommerce application.
We will have exact the same use case into our service ecommerce application in the upcoming lectures.
The event also can be generated from existing sources like Amazon.
Case one A new queue message is available in the queue.
It can go to Lambda with pulling queue records from the space event.
Event architectures rely on creating events into all application state chains and that are observable
by other services.
But even publisher system is unaware of which consumer are subscribing that event.
We can call that these are the loosely coupled services most lambda based applications use a combination
of services for different requirements about storage, API management and integrating with other systems
and services.
In these examples applications, Lambda is connecting between services, providing business logic to
transform data that moves between microservices.
So we set that solar certification, mostly using a combination of several sources that integrated with
custom code, running the lambda functions and communicating with events.
We can find mostly integrated sources with using the lambda functions.
You can see the image on the slide.
These sources are most commonly used in-service applications with lambda functions.
You can see the categories and services in the compute category.
We have a double lambda in the test storage, Amazon, S3, Dynamo DB and Rrd's in API management.
We have API Gateway in control.
In integration layer, we have SANS creates an event which in orchestration layer we have state functions
and so on.
So we will also use these services into our service hands on labs.
But before that we should clearly understand that how this lambda events works and how we can use events
into our Node.js function codes using the event object.
Let's get started.