1
00:00:06,920 --> 00:00:09,270
- The API gateway service

2
00:00:09,270 --> 00:00:14,270
fills an important gap in the
AWS ecosystem functionality.

3
00:00:17,170 --> 00:00:20,880
The application load
balancer is able to take

4
00:00:20,880 --> 00:00:25,380
inbound requests and forward
them to backend resources,

5
00:00:25,380 --> 00:00:29,490
but it doesn't function as a REST API,

6
00:00:29,490 --> 00:00:32,563
and sometimes that's exactly
the service that you need.

7
00:00:33,420 --> 00:00:38,210
And so the API gateway is
a region scoped service

8
00:00:38,210 --> 00:00:42,370
that does exactly that,
it is a managed REST API,

9
00:00:42,370 --> 00:00:45,220
where you can define all of your methods

10
00:00:45,220 --> 00:00:47,143
directly within this service.

11
00:00:49,040 --> 00:00:51,060
It is also serverless,

12
00:00:51,060 --> 00:00:54,510
so there's no concept of CPU, or memory,

13
00:00:54,510 --> 00:00:58,420
or disc space, or individual nodes.

14
00:00:58,420 --> 00:01:01,623
It simply operates as the service itself.

15
00:01:03,100 --> 00:01:06,420
And it supports encrypted endpoints,

16
00:01:06,420 --> 00:01:11,270
so you can create a certificate
in AWS Certificate Manager,

17
00:01:11,270 --> 00:01:14,240
and assign it to an API gateway,

18
00:01:14,240 --> 00:01:17,433
so that you can accept HTTPS traffic.

19
00:01:19,380 --> 00:01:21,260
There are different endpoint types

20
00:01:21,260 --> 00:01:24,990
that are supported by
the API gateway service.

21
00:01:24,990 --> 00:01:27,020
We have edge-optimized,

22
00:01:27,020 --> 00:01:32,020
which means API gateway is
almost running in a global scope,

23
00:01:32,320 --> 00:01:36,163
pushing those endpoints
out to the edge locations.

24
00:01:37,450 --> 00:01:41,770
You have regional, which
is the default behavior,

25
00:01:41,770 --> 00:01:44,850
and these can be reached within
those individual regions,

26
00:01:44,850 --> 00:01:45,973
as well as globally.

27
00:01:46,920 --> 00:01:51,563
And, there's an interesting
third type called private.

28
00:01:52,550 --> 00:01:55,980
A private gateway endpoint

29
00:01:55,980 --> 00:01:59,193
can be reached from inside of a VPC,

30
00:02:00,120 --> 00:02:05,120
by creating an interface
endpoint for API gateway,

31
00:02:05,890 --> 00:02:08,253
and attaching it to that VPC.

32
00:02:11,220 --> 00:02:14,200
There are a number of different API types

33
00:02:14,200 --> 00:02:15,600
that you can create as well.

34
00:02:16,740 --> 00:02:21,307
You can do a traditional
HTTP or HTTPS API,

35
00:02:23,690 --> 00:02:26,670
you can create a REST API,

36
00:02:26,670 --> 00:02:29,990
and you can create a WebSocket API.

37
00:02:29,990 --> 00:02:33,120
And this is important
if you are working on

38
00:02:33,120 --> 00:02:35,990
any of the certifications for AWS,

39
00:02:35,990 --> 00:02:40,360
recognizing that the API gateway
service supports WebSockets

40
00:02:40,360 --> 00:02:43,663
might help you to answer
certain question scenarios.

41
00:02:46,250 --> 00:02:48,700
And so now let's take a
look at the architecture.

42
00:02:49,560 --> 00:02:52,760
There are a lot of
different potential clients

43
00:02:52,760 --> 00:02:56,480
who can access an API gateway endpoint.

44
00:02:56,480 --> 00:03:01,253
We've got individual users using
mobile devices or whatever,

45
00:03:02,410 --> 00:03:06,083
you have web apps that are using browsers,

46
00:03:08,550 --> 00:03:12,593
it supports IoT or internet
of things endpoints,

47
00:03:14,260 --> 00:03:18,370
and it could just be a
private internal application

48
00:03:18,370 --> 00:03:20,430
that is accessing the API gateway

49
00:03:20,430 --> 00:03:24,703
using a VPC interface
endpoint and private link.

50
00:03:26,690 --> 00:03:30,430
From there, the API gateway,
it's just a REST API,

51
00:03:30,430 --> 00:03:33,850
you have your methods, you
can cache your results,

52
00:03:33,850 --> 00:03:37,410
you can push metrics and
logs into CloudWatch,

53
00:03:37,410 --> 00:03:41,470
and you can choose to
return specific results

54
00:03:41,470 --> 00:03:44,100
directly from the API gateway,

55
00:03:44,100 --> 00:03:48,240
or if you require something
that isn't quite static,

56
00:03:48,240 --> 00:03:52,020
you can push those requests to a backend,

57
00:03:52,020 --> 00:03:56,830
like a corporate data center
with an internal application

58
00:03:58,210 --> 00:03:59,570
or a Lambda function.

59
00:03:59,570 --> 00:04:02,640
In fact, Lambda and API gateway

60
00:04:02,640 --> 00:04:05,700
were both brought into preview,

61
00:04:05,700 --> 00:04:09,850
and then made GA at the same time in AWS,

62
00:04:09,850 --> 00:04:12,540
because there's a tremendous amount

63
00:04:12,540 --> 00:04:14,103
of integration between them.

64
00:04:15,870 --> 00:04:19,070
You can forward to an
EC2 individual instance,

65
00:04:19,070 --> 00:04:21,683
or an elastic load balancer backend.

66
00:04:23,500 --> 00:04:26,120
You could direct your traffic to DynamoDB,

67
00:04:26,120 --> 00:04:28,970
as an example of another service,

68
00:04:28,970 --> 00:04:31,890
or you could even forward that traffic

69
00:04:31,890 --> 00:04:35,033
to some publicly accessible backend,

70
00:04:35,900 --> 00:04:37,330
where it can then be handled,

71
00:04:37,330 --> 00:04:40,533
and the response returned
back to the client.
