1
00:00:00,090 --> 00:00:05,910
In this video we are going to perform and to test of our hands on love, which is the final service

2
00:00:05,910 --> 00:00:08,720
architecture using Sanskrit and lambda.

3
00:00:08,730 --> 00:00:14,640
So that means we will start at this point in the client application and send a HTTP post request with

4
00:00:14,640 --> 00:00:16,890
the payload of the order created event.

5
00:00:16,890 --> 00:00:22,320
And these API gateway redirect to the lambda function, which is the order acknowledgement microservices.

6
00:00:22,320 --> 00:00:28,590
And in microservices we will validate the incoming request and save item in the order table and also

7
00:00:28,590 --> 00:00:32,310
publish message to Amazon Sans and return back the synchronous response.

8
00:00:32,310 --> 00:00:40,590
And after that Amazon is subscribed by the excuse these three to consume from the Amazon SAS and this

9
00:00:40,590 --> 00:00:43,590
will be added item into the queue.

10
00:00:43,590 --> 00:00:48,780
And these requests are consumed from the downstream microservices which are the notification inventory

11
00:00:48,780 --> 00:00:51,330
and shipment in the inventory of microservices.

12
00:00:51,330 --> 00:00:58,200
These will be pulled the case record item into lambda function and the invocation happens with the interaction

13
00:00:58,200 --> 00:01:00,600
with the inventory table on Dynamo DB.

14
00:01:00,600 --> 00:01:03,450
So save item in the event table.

15
00:01:03,600 --> 00:01:04,050
Okay.

16
00:01:04,050 --> 00:01:04,560
Very good.

17
00:01:04,560 --> 00:01:05,790
So let's get started.

18
00:01:05,790 --> 00:01:08,850
I'm going to start with the HTTP post request.

19
00:01:08,880 --> 00:01:12,210
We can get the payload from the command to text file.

20
00:01:12,210 --> 00:01:18,360
And if you go back to Postman, you can see that this is the our API gateway order endpoint that we

21
00:01:18,360 --> 00:01:22,260
are sending the ACG post request and we have already did before.

22
00:01:22,260 --> 00:01:25,230
And this is the payload of what we have sent in the last video.

23
00:01:25,230 --> 00:01:29,580
So I'm going to send the same payload and see what's happened from the inventory side.

24
00:01:29,580 --> 00:01:33,090
Click the send button and this will be returned back to us.

25
00:01:33,090 --> 00:01:38,970
Synchronous Success Message That means order create operation successfully happened and the message

26
00:01:38,970 --> 00:01:45,240
is published to SNS topic and this topic will be consumed from subscribers as case topics.

27
00:01:45,240 --> 00:01:52,080
So let's open the A management console and see the tables of the Dynamo TV.

28
00:01:52,080 --> 00:01:56,940
So I'm going to look at the directly from the inventory table if there is an item.

29
00:01:56,940 --> 00:01:59,460
So that means we it is consumed successfully.

30
00:01:59,460 --> 00:02:04,800
And when you open the inventory table, you can see that the item is created successfully.

31
00:02:04,830 --> 00:02:11,460
So that means inventory microservice pulls the record item in the case and interact with the Dynamo

32
00:02:11,470 --> 00:02:14,250
DB At this item Dynamo DB table.

33
00:02:14,550 --> 00:02:20,220
As you can see, the code is the icon, which is the item, and the rest of the attributes comes from

34
00:02:20,220 --> 00:02:21,810
the JSON object.

35
00:02:21,810 --> 00:02:23,040
So very good.

36
00:02:23,040 --> 00:02:30,630
So let's open the inventory microservices, go to monitor and we will close and see how it is invocation

37
00:02:30,630 --> 00:02:31,080
happens.

38
00:02:31,080 --> 00:02:36,900
If you open the latest log stream, you can see that this is the incoming request from the case.

39
00:02:36,900 --> 00:02:38,250
This is the body information.

40
00:02:38,250 --> 00:02:43,920
And in the body information we have a message from the SNS topic and this is our actual attribute,

41
00:02:43,920 --> 00:02:46,920
actual object, which is the order created object.

42
00:02:46,920 --> 00:02:53,520
And if you scroll down you can see that we can see the record object and after that we can see the SNS

43
00:02:53,520 --> 00:02:54,990
message in here.

44
00:02:55,170 --> 00:02:58,590
After that you can see the our actual order data.

45
00:02:58,590 --> 00:03:03,180
So these are the steps what we have develop in the inventory database.

46
00:03:03,180 --> 00:03:09,420
And after that we are writing these item into dynamic DB and see that successfully create our Dynamo

47
00:03:09,630 --> 00:03:10,560
inventory table.

48
00:03:10,560 --> 00:03:15,600
The log should be changed and we have successfully perform the internal operation.

49
00:03:15,600 --> 00:03:21,750
So please open the architecture and we have verified that we sent request to client application and

50
00:03:21,750 --> 00:03:27,720
this will go to our inventory database from the space and write the item in the inventory table.
