1
00:00:02,120 --> 00:00:05,450
<v Instructor>Now I will say that services like ECS,</v>

2
00:00:05,450 --> 00:00:07,630
which we used in the deployment section

3
00:00:07,630 --> 00:00:09,670
can help us with these problems.

4
00:00:09,670 --> 00:00:12,200
And to some extent, we already used

5
00:00:12,200 --> 00:00:17,200
the help AWS ECS provides without even noticing it.

6
00:00:17,510 --> 00:00:22,430
For example, the ECS service will automatically check

7
00:00:22,430 --> 00:00:24,610
the health of our containers,

8
00:00:24,610 --> 00:00:27,070
so it will see if there are still up and running

9
00:00:27,070 --> 00:00:29,700
and it will automatically restart containers

10
00:00:29,700 --> 00:00:31,550
when they crash.

11
00:00:31,550 --> 00:00:34,370
And that is something we did see in action

12
00:00:34,370 --> 00:00:37,530
throughout the deployment section when our container,

13
00:00:37,530 --> 00:00:40,580
for example, failed to connect to a database

14
00:00:40,580 --> 00:00:44,483
and therefore was restarted and restarted and restarted.

15
00:00:45,450 --> 00:00:49,600
So AWS offers this to us, and when using ECS

16
00:00:49,600 --> 00:00:51,980
it's very easy to take advantage of that.

17
00:00:52,830 --> 00:00:56,390
And even though we didn't really utilize that a lot,

18
00:00:56,390 --> 00:01:01,020
AWS ECS, also would help us with auto scaling.

19
00:01:01,020 --> 00:01:04,730
So with dynamically, increasing and decreasing

20
00:01:04,730 --> 00:01:07,980
the number of container instances in the end,

21
00:01:07,980 --> 00:01:09,800
which are up and running

22
00:01:09,800 --> 00:01:13,980
to help us handle incoming traffic spikes, for example.

23
00:01:13,980 --> 00:01:17,410
And it then also has a tool called a load balancer,

24
00:01:17,410 --> 00:01:21,640
which we also did set up to have a unchanging IP address

25
00:01:21,640 --> 00:01:24,440
or a domain we could use for testing,

26
00:01:24,440 --> 00:01:26,980
which does actually not just give us this domain,

27
00:01:26,980 --> 00:01:28,290
which never changes,

28
00:01:28,290 --> 00:01:30,130
but which would also ensure

29
00:01:30,130 --> 00:01:32,090
that if you got incoming traffic,

30
00:01:32,090 --> 00:01:34,690
that traffic is split evenly

31
00:01:34,690 --> 00:01:37,420
across all running container instances,

32
00:01:37,420 --> 00:01:40,543
in case you have more than one running container instance.

33
00:01:41,770 --> 00:01:45,250
So services like AWS ECS

34
00:01:45,250 --> 00:01:49,200
already help us solve the problems I just outlined,

35
00:01:49,200 --> 00:01:51,300
which is another strong reason

36
00:01:51,300 --> 00:01:54,850
for turning towards such managed services

37
00:01:54,850 --> 00:01:58,440
instead of manually deploying everything.

38
00:01:58,440 --> 00:02:00,820
But of course, we still have one downside,

39
00:02:00,820 --> 00:02:05,680
one disadvantage when using a service like AWS ECS,

40
00:02:05,680 --> 00:02:09,870
we are basically locked into that service.

41
00:02:09,870 --> 00:02:14,100
If we use a specific cloud service by some cloud provider,

42
00:02:14,100 --> 00:02:16,870
no matter which cloud provider that is,

43
00:02:16,870 --> 00:02:20,203
we are kind of locked into that service.

44
00:02:21,120 --> 00:02:23,380
At the example of ECS,

45
00:02:23,380 --> 00:02:25,050
the problem which we have

46
00:02:25,050 --> 00:02:30,050
is that we need to configure everything as defined by AWS.

47
00:02:31,159 --> 00:02:36,100
AWS, for example, things and clusters, tasks and services,

48
00:02:36,100 --> 00:02:41,033
and we need to set the options, AWS lets us set.

49
00:02:41,870 --> 00:02:46,670
So whatever we set up there will then work for AWS ECS,

50
00:02:46,670 --> 00:02:51,090
and we can define it here in this visual user interface

51
00:02:51,090 --> 00:02:56,090
in the AWS console or all the work with a command line tool

52
00:02:56,110 --> 00:02:59,067
like the ecs-cli, which we haven't used,

53
00:02:59,067 --> 00:03:02,960
but we don't have to use that console if we don't want to,

54
00:03:02,960 --> 00:03:04,570
we can also use the command line

55
00:03:04,570 --> 00:03:07,270
to create all these resources.

56
00:03:07,270 --> 00:03:11,160
And we can also actually define configuration files

57
00:03:11,160 --> 00:03:14,110
where we basically write down the configuration

58
00:03:14,110 --> 00:03:18,320
we wanna have for our ECS cluster and tasks.

59
00:03:18,320 --> 00:03:23,320
And then we can use that AWS ECS-CLI to pick up

60
00:03:23,350 --> 00:03:25,470
on these configuration files

61
00:03:25,470 --> 00:03:29,130
and create the appropriate cloud resources based on that.

62
00:03:29,130 --> 00:03:31,330
So we don't have to use that UI,

63
00:03:31,330 --> 00:03:34,990
we can also use conflict files and therefore maybe speed up

64
00:03:34,990 --> 00:03:36,960
the entire deployment process,

65
00:03:36,960 --> 00:03:41,893
but we will always be locked into this specific AWS service,

66
00:03:42,820 --> 00:03:45,960
which means if we wanna switch to another service

67
00:03:45,960 --> 00:03:47,930
by another cloud provider,

68
00:03:47,930 --> 00:03:51,920
the conflict files we wrote for AWS ECS

69
00:03:51,920 --> 00:03:56,490
won't work there because this is AWS specific.

70
00:03:56,490 --> 00:04:01,280
The settings defined here will work with AWS ECS,

71
00:04:01,280 --> 00:04:02,740
but not with some service

72
00:04:02,740 --> 00:04:05,610
offered by Microsoft Azure, for example.

73
00:04:05,610 --> 00:04:09,980
So we're locking ourselves into AWS and AWS ECS

74
00:04:09,980 --> 00:04:11,460
if we start working with it

75
00:04:11,460 --> 00:04:14,720
and we need to learn the specifics of that service

76
00:04:14,720 --> 00:04:18,270
the specific terms and the configuration options we can set.

77
00:04:18,270 --> 00:04:20,710
And if we wanna switch to another provider,

78
00:04:20,710 --> 00:04:23,860
we have to learn the specifics of that provider

79
00:04:23,860 --> 00:04:26,210
and the service offered by that provider,

80
00:04:26,210 --> 00:04:30,130
and we manually have to translate the configuration

81
00:04:30,130 --> 00:04:35,130
we used for AWS ECS to that service by some other provider,

82
00:04:35,630 --> 00:04:37,073
if we wanna switch.

83
00:04:37,940 --> 00:04:41,180
So just knowing Docker won't be enough,

84
00:04:41,180 --> 00:04:43,540
we also have to learn about AWS ECS

85
00:04:44,940 --> 00:04:47,063
or whichever service we're using.

86
00:04:48,090 --> 00:04:50,900
Now, of course, this might be totally fine

87
00:04:50,900 --> 00:04:53,630
if you know that you wanna stick with AWS,

88
00:04:53,630 --> 00:04:55,170
you're happy with it,

89
00:04:55,170 --> 00:04:58,550
and once you learn how to work with ECS,

90
00:04:58,550 --> 00:05:01,270
of course, that's just a skill you have

91
00:05:01,270 --> 00:05:02,710
and you will be fine.

92
00:05:02,710 --> 00:05:06,000
So this might not be a huge problem necessarily,

93
00:05:06,000 --> 00:05:08,480
but of course it can be an issue,

94
00:05:08,480 --> 00:05:10,953
and that's where Kubernetes us can help us.

