In this video we are going to perform and to test of our hands on love, which is the final service
architecture using Sanskrit and lambda.
So that means we will start at this point in the client application and send a HTTP post request with
the payload of the order created event.
And these API gateway redirect to the lambda function, which is the order acknowledgement microservices.
And in microservices we will validate the incoming request and save item in the order table and also
publish message to Amazon Sans and return back the synchronous response.
And after that Amazon is subscribed by the excuse these three to consume from the Amazon SAS and this
will be added item into the queue.
And these requests are consumed from the downstream microservices which are the notification inventory
and shipment in the inventory of microservices.
These will be pulled the case record item into lambda function and the invocation happens with the interaction
with the inventory table on Dynamo DB.
So save item in the event table.
Okay.
Very good.
So let's get started.
I'm going to start with the HTTP post request.
We can get the payload from the command to text file.
And if you go back to Postman, you can see that this is the our API gateway order endpoint that we
are sending the ACG post request and we have already did before.
And this is the payload of what we have sent in the last video.
So I'm going to send the same payload and see what's happened from the inventory side.
Click the send button and this will be returned back to us.
Synchronous Success Message That means order create operation successfully happened and the message
is published to SNS topic and this topic will be consumed from subscribers as case topics.
So let's open the A management console and see the tables of the Dynamo TV.
So I'm going to look at the directly from the inventory table if there is an item.
So that means we it is consumed successfully.
And when you open the inventory table, you can see that the item is created successfully.
So that means inventory microservice pulls the record item in the case and interact with the Dynamo
DB At this item Dynamo DB table.
As you can see, the code is the icon, which is the item, and the rest of the attributes comes from
the JSON object.
So very good.
So let's open the inventory microservices, go to monitor and we will close and see how it is invocation
happens.
If you open the latest log stream, you can see that this is the incoming request from the case.
This is the body information.
And in the body information we have a message from the SNS topic and this is our actual attribute,
actual object, which is the order created object.
And if you scroll down you can see that we can see the record object and after that we can see the SNS
message in here.
After that you can see the our actual order data.
So these are the steps what we have develop in the inventory database.
And after that we are writing these item into dynamic DB and see that successfully create our Dynamo
inventory table.
The log should be changed and we have successfully perform the internal operation.
So please open the architecture and we have verified that we sent request to client application and
this will go to our inventory database from the space and write the item in the inventory table.