1
00:00:00,420 --> 00:00:08,970
In this video, we are going to develop hands on lab built cloud microservices with HTTP API and a lambda.

2
00:00:09,720 --> 00:00:16,140
In this handle lab, we basically create a serverless API that creates, reads, updates and deletes

3
00:00:16,140 --> 00:00:16,920
products.

4
00:00:17,790 --> 00:00:24,300
We will handle incoming requests from the HTTP API of API gateway into the lambda function and return

5
00:00:24,300 --> 00:00:31,980
back to response synchronously when we invoke our HTTP API API gateway rules to the request to do a

6
00:00:32,370 --> 00:00:33,360
lambda function.

7
00:00:33,360 --> 00:00:39,480
And the lambda function interacts with the database dynamic DB database and returns a response to the

8
00:00:39,480 --> 00:00:44,430
API Gateway API Gateway then returns a response to the client application.

9
00:00:44,880 --> 00:00:46,730
You can see the image on the slide.

10
00:00:46,750 --> 00:00:55,080
We will create a HTTP API, a lambda dynamo DB and client send the HTTP request which requests our get

11
00:00:55,080 --> 00:00:59,280
post and delete to perform CRUD operations for the product API.

12
00:00:59,280 --> 00:01:01,860
So we will use the product resources.

13
00:01:01,860 --> 00:01:09,000
We get product by ID, delete product by ID, get products and create a product with the HTTP post method.

14
00:01:09,120 --> 00:01:13,800
And also we will define some request root k pit and query setting.

15
00:01:13,830 --> 00:01:19,650
As you remember, that HTTP API triggered a lambda with incoming event JSON object, including these

16
00:01:19,650 --> 00:01:22,080
attributes and a lambda function.

17
00:01:22,080 --> 00:01:27,480
Interact with the dynamo DB to perform CRUD operation and response back to the HTTP API and this will

18
00:01:27,480 --> 00:01:29,370
be returned back to the client application.

19
00:01:29,370 --> 00:01:30,750
So let's get started.

20
00:01:30,750 --> 00:01:37,200
The first step is create a lambda function in order to please open a management console, go to the

21
00:01:37,200 --> 00:01:40,020
lambda functions and click the create function.

22
00:01:40,020 --> 00:01:46,050
So basically I'm going to create a function which name is product function because we are implementing

23
00:01:46,050 --> 00:01:47,520
the product microservices.

24
00:01:47,520 --> 00:01:54,690
So runtime will be live as its architecture permissions and every other complications make live as it

25
00:01:54,690 --> 00:01:55,020
is.

26
00:01:55,020 --> 00:02:01,650
So please click the create function and this example function returns a basic 200 response and the hello

27
00:02:01,650 --> 00:02:02,820
from Lambda Text.

28
00:02:03,560 --> 00:02:06,590
And you know, the default lambda function code.

29
00:02:07,550 --> 00:02:12,710
After creating the lambda function, we will start developing our product lambda function according

30
00:02:12,710 --> 00:02:14,180
to perform CRUD operation.

31
00:02:14,290 --> 00:02:14,640
Okay.

32
00:02:14,660 --> 00:02:18,110
If you scroll down, you can see this default lambda function.

33
00:02:18,110 --> 00:02:20,210
Product function is created successfully.

34
00:02:20,360 --> 00:02:27,200
The first step I'm going to add a log operation is you remember that this http lambda function triggered

35
00:02:27,200 --> 00:02:29,930
from the HTTP API of API gateway.

36
00:02:29,930 --> 00:02:36,530
So that's why the first step is good to understand to logging incoming event JSON object click to deploy

37
00:02:36,530 --> 00:02:37,100
button.

38
00:02:37,310 --> 00:02:43,940
So now we will deploy the develop this lambda function after understanding the incoming event JSON format.

39
00:02:43,940 --> 00:02:49,820
So before that, let's understand the event JSON format and create a HTTP API.
