1
00:00:00,270 --> 00:00:05,730
In this video, we are going to see Amazon API Gateway use cases.

2
00:00:06,210 --> 00:00:09,120
There are three main use cases for Amazon API Gateway.

3
00:00:09,150 --> 00:00:16,260
We can use the API gateway to create a HTTP API to create rest API to create a web socket API.

4
00:00:16,470 --> 00:00:18,240
Let's talk about one by one.

5
00:00:18,720 --> 00:00:23,160
First use case is using API gateway to create http api.

6
00:00:23,190 --> 00:00:28,260
The main use case is creating a http api of amazon API gateway.

7
00:00:28,470 --> 00:00:34,560
HTTP API is enabled to create restful APIs with lower latency and lower cost than rest API.

8
00:00:34,590 --> 00:00:41,910
We can use HTTP API to send requests to a lambda functions or to any public ratable HTTP endpoint.

9
00:00:42,150 --> 00:00:47,100
For example, we can create an HTTP API that integrates with a lambda function on the backend.

10
00:00:47,100 --> 00:00:48,900
And also you can see the image.

11
00:00:48,900 --> 00:00:51,910
The image shows this flow.

12
00:00:51,930 --> 00:00:57,060
When a client calls our API, API, gateway sends the request to the lambda function and returns the

13
00:00:57,060 --> 00:00:59,400
function response to the client application.

14
00:00:59,970 --> 00:01:03,660
HTTP API supports OpenID Connect and or authorization.

15
00:01:03,660 --> 00:01:07,290
They come with the built in support for the course and automatic deployments.

16
00:01:07,860 --> 00:01:14,100
Let's talk about the second use case, which is the using API gateway to create rest API API.

17
00:01:14,100 --> 00:01:18,180
Gateway Rest API is made up resources and methods.

18
00:01:18,510 --> 00:01:25,140
A resource is logical entity that application can access via a resource path and a method corresponds

19
00:01:25,140 --> 00:01:29,280
to rest API requests to send by the user of the API.

20
00:01:29,310 --> 00:01:31,130
The response return to the user.

21
00:01:31,140 --> 00:01:38,730
For example, if we have a product API that we can send a post request, we can design product as a

22
00:01:38,730 --> 00:01:44,280
method and we can create a product method and resource in our application.

23
00:01:44,280 --> 00:01:50,880
When we create a rest API and a resource can have one or more operations defined by the application

24
00:01:50,880 --> 00:01:59,220
HTTP verbs like we can design our products, get post, put page and delete HTTP methods and the combination

25
00:01:59,220 --> 00:02:03,870
of resource, pet and operation defines a method will be the API.

26
00:02:03,960 --> 00:02:10,560
So for example, if we have product post method, it could be create any product and if we get the basket

27
00:02:10,560 --> 00:02:12,950
operation, it can create the basket data.

28
00:02:12,960 --> 00:02:19,020
The application doesn't know where the request data is stored and from where it retrieved from the backend,

29
00:02:19,050 --> 00:02:21,170
it is only exposing APIs.

30
00:02:21,180 --> 00:02:28,040
So in API, gateway rest API, the front end is encapsulated with the method, request and method responses.

31
00:02:28,050 --> 00:02:33,060
The API interfaces with the backend through integration requests and integration responses.

32
00:02:33,510 --> 00:02:39,060
For example, if you look at the image on the slide, you can see the API gateway accepting dynamic

33
00:02:39,060 --> 00:02:42,810
API calls from the browser with dynamic DB as the backend.

34
00:02:42,840 --> 00:02:48,810
The API developer sets up the integration request to the for the incoming method to request to the selected

35
00:02:48,810 --> 00:02:50,760
backend using the lambda.

36
00:02:50,760 --> 00:02:55,380
So the last use case is the web socket API.

37
00:02:55,380 --> 00:02:58,230
So we can talk about the web socket API.

38
00:02:58,260 --> 00:03:05,040
We can use the web socket API when the client and the server can both send message to each other at

39
00:03:05,040 --> 00:03:06,540
any time they can.

40
00:03:06,540 --> 00:03:13,020
Service can easily push data to connected users and devices and avoiding the need to implement complex

41
00:03:13,020 --> 00:03:14,310
polling mechanism.

42
00:03:14,310 --> 00:03:20,340
For example, we could boost the serverless application using Amazon API, Gateway Web Socket API and

43
00:03:20,340 --> 00:03:28,770
a lambda to send and receive message and from individual users or groups in a chat room so we can design

44
00:03:28,770 --> 00:03:33,180
a chatroom application using the Amazon API, gateway web socket API.

45
00:03:33,630 --> 00:03:41,220
Or we could invoke backend services such as Amazon, Ada, Lambda, Amazon Kinesis or any HTTP endpoint.

46
00:03:41,220 --> 00:03:48,510
Based on the message content, we can use API Gateway Web socket API to build secure real time communication

47
00:03:48,510 --> 00:03:54,210
applications without having to provision or manage any servers to manage connections or large scale

48
00:03:54,210 --> 00:03:55,320
data exchanges.

49
00:03:55,590 --> 00:04:01,530
It basically targets to use games, including real time applications such as the chat applications,

50
00:04:01,530 --> 00:04:07,020
real time dashboards like stock tickers and real time alerts and notifications.
