WEBVTT
Kind: captions
Language: en

1
00:00:00.000 --> 00:00:06.989
Last time we sized EC2 instances and scaled them. Today we let AWS take on more of the work.

2
00:00:06.989 --> 00:00:13.979
Two ideas. First, containers: what a container image is, where you store it with Amazon ECR,

3
00:00:13.979 --> 00:00:21.576
and how Amazon ECS, Amazon EKS and AWS Fargate run it. Second, serverless functions with AWS Lambda.

4
00:00:21.576 --> 00:00:26.970
We'll finish with three quick extras the exam likes: Elastic Beanstalk,

5
00:00:26.970 --> 00:00:31.300
Lightsail and AWS Batch. This is still Task 3.3, compute.

6
00:00:31.700 --> 00:00:38.779
A virtual machine carries a full guest operating system for every app. A container is lighter.

7
00:00:38.779 --> 00:00:45.783
It packs the app with its libraries and settings into an image, and many containers share one

8
00:00:45.783 --> 00:00:53.163
host operating system through a container runtime. That makes containers small and quick to start.

9
00:00:53.163 --> 00:01:00.619
And because the image holds everything the app needs, it runs the same way on a developer's laptop,

10
00:01:00.619 --> 00:01:02.200
a test server or AWS.

11
00:01:02.600 --> 00:01:08.582
Our store's developer builds a new image of the website: store-web, version three.

12
00:01:08.582 --> 00:01:14.565
Where does it live? In Amazon Elastic Container Registry, or ECR: a fully managed,

13
00:01:14.565 --> 00:01:21.349
private registry to store, manage and deploy container images. The developer pushes the image

14
00:01:21.349 --> 00:01:28.207
to ECR, and the services that run containers pull it from there. IAM controls who can push and

15
00:01:28.207 --> 00:01:34.700
pull. There's nothing to run yourself: you pay for the image data you store and transfer.

16
00:01:35.100 --> 00:01:40.930
Running one container is easy. Running hundreds needs an orchestrator: it places containers,

17
00:01:40.930 --> 00:01:45.999
keeps the right number running, replaces failed ones and rolls out new versions.

18
00:01:45.999 --> 00:01:51.132
AWS offers two. Amazon ECS, Elastic Container Service, is AWS's own orchestrator:

19
00:01:51.132 --> 00:01:56.709
simple to start and tightly integrated with AWS. Amazon EKS, Elastic Kubernetes Service,

20
00:01:56.709 --> 00:02:02.222
is managed Kubernetes, the open-source standard. AWS runs the Kubernetes control plane,

21
00:02:02.222 --> 00:02:05.200
and teams keep their existing Kubernetes tools.

22
00:02:05.600 --> 00:02:12.004
Both orchestrators need compute to run on. Option one: EC2 instances in your cluster.

23
00:02:12.004 --> 00:02:18.032
You pick the instance types, patch them and scale them. Option two: AWS Fargate,

24
00:02:18.032 --> 00:02:24.285
serverless compute for containers. You set the CPU and memory for each task or pod,

25
00:02:24.285 --> 00:02:31.292
and AWS runs, patches and scales the servers underneath. You pay for the vCPU and memory your

26
00:02:31.292 --> 00:02:38.600
containers use. Note that Fargate isn't a third orchestrator: it runs your ECS tasks or EKS pods.

27
00:02:39.000 --> 00:02:45.478
Now our second idea: serverless functions. Serverless doesn't mean there are no servers.

28
00:02:45.478 --> 00:02:52.325
It means AWS manages them. With AWS Lambda, you upload code as a function and connect it to a

29
00:02:52.325 --> 00:02:58.214
trigger. A shopper's photo lands in Amazon S3, and a function saves a thumbnail.

30
00:02:58.214 --> 00:03:04.030
A request arrives through Amazon API Gateway, and a function returns the order.

31
00:03:04.030 --> 00:03:09.846
A nightly schedule runs a sales report. Lambda runs only when an event arrives,

32
00:03:09.846 --> 00:03:13.600
and scales automatically with the number of events.

33
00:03:14.000 --> 00:03:19.494
Lambda pricing has two parts: the number of requests, and the duration,

34
00:03:19.494 --> 00:03:26.767
measured in milliseconds and priced by the memory you choose. No events means nothing runs and

35
00:03:26.767 --> 00:03:32.802
nothing is billed. You can give a function from 128 MB to 10,240 MB of memory,

36
00:03:32.802 --> 00:03:39.070
and more memory also brings more CPU. Lambda is built for short, stateless tasks.

37
00:03:39.070 --> 00:03:44.718
In November 2026 AWS raised the longest single run from 15 to 30 minutes,

38
00:03:44.718 --> 00:03:48.200
so older practice questions may still say 15.

39
00:03:48.600 --> 00:03:55.622
Three more compute services to recognize. AWS Elastic Beanstalk is platform as a service for web

40
00:03:55.622 --> 00:04:03.228
apps: you upload your code, and it handles capacity, load balancing, Auto Scaling and health monitoring.

41
00:04:03.228 --> 00:04:09.006
Amazon Lightsail is the simplest way to get a virtual server: a bundle of vCPU,

42
00:04:09.006 --> 00:04:16.101
memory, SSD storage and data transfer at a low, predictable price. And AWS Batch runs batch jobs,

43
00:04:16.101 --> 00:04:19.100
choosing and scaling the compute for you.

44
00:04:19.500 --> 00:04:26.148
Put the options on one line. With EC2 you manage the operating system, patches and scaling.

45
00:04:26.148 --> 00:04:31.918
With ECS or EKS on EC2, you still manage the cluster's instances. With Fargate,

46
00:04:31.918 --> 00:04:38.274
you manage only your containers. With Lambda, only your code. Our store could mix them:

47
00:04:38.274 --> 00:04:45.506
product pages in containers on Fargate, thumbnails in Lambda, and big nightly reports in AWS Batch.

48
00:04:45.506 --> 00:04:50.400
On the exam, the serverless compute options are Lambda and Fargate.

49
00:04:50.800 --> 00:04:57.142
Here's how the exam asks about this. Package an app with its dependencies so it runs anywhere:

50
00:04:57.142 --> 00:05:03.416
containers. Store and manage container images: Amazon ECR. Anything that mentions Kubernetes:

51
00:05:03.416 --> 00:05:09.961
Amazon EKS. Run containers without managing servers: AWS Fargate. Run code in response to events,

52
00:05:09.961 --> 00:05:16.033
paying only when it runs: AWS Lambda. Upload code and let AWS handle capacity and scaling:

53
00:05:16.033 --> 00:05:21.700
Elastic Beanstalk. A simple server at a predictable monthly price: Amazon Lightsail.

54
00:05:22.100 --> 00:05:29.265
To recap: a container image packs an app with its dependencies, and Amazon ECR stores the images.

55
00:05:29.265 --> 00:05:34.510
Amazon ECS is AWS's orchestrator, and Amazon EKS is managed Kubernetes.

56
00:05:34.510 --> 00:05:40.936
Both run on EC2 instances or on serverless AWS Fargate. AWS Lambda runs code on events,

57
00:05:40.936 --> 00:05:47.584
billed by requests and duration, for up to 30 minutes per run. Beanstalk deploys web apps,

58
00:05:47.584 --> 00:05:53.789
Lightsail gives simple servers, and Batch runs batch jobs. Next, we move to storage:

59
00:05:53.789 --> 00:05:56.300
Amazon S3 and its storage classes.
