‫So now let's talk about ECS.
‫ECS stands for elastic container service,
‫and this is used to launch the docker containers
‫we just talked about on AWS.
‫For it to work,
‫we need the docker containers to run somewhere,
‫and so for ECS, you must provision
‫and maintain the infrastructure yourself.
‫So that means you need to create EC2 instances in advance.
‫AWS will take care of starting
‫or stopping the containers for you,
‫and it has integration
‫with an application balancer,
‫if you want to create a web application on ECS.
‫So as a diagram, you would have multiple EC2 instances
‫and we would need to create these EC2 instances in advance
‫and they will be running different containers
‫by the ECS service.
‫Now the ECS service,
‫any times it has a new docker container,
‫it will be smart enough to find on which EC2 instance
‫to place that docker container.
‫So anytime in the exam you see,
‫I want to run docker containers on AWS, think of ECS.
‫Now let's talk about Fargate.
‫So Fargate is also used to launch docker containers on AWS.
‫But this time with Fargate,
‫we don't need to provision any infrastructure.
‫So we don't need to create any EC2 instances
‫and manage them.
‫And this is a much more simple offering from AWS.
‫This is actually a serverless offering
‫because we don't manage any servers.
‫AWS will just run the containers that we need
‫based on the specification
‫of CPU and RAM for each container.
‫So Fargate is going to be a lot simpler to use
‫and I like it personally a lot.
‫Fargate is here.
‫Say we have to have a new docker container
‫to be run on Fargate, then Fargate will
‫automatically run that container for us.
‫We don't exactly know where, but it will be run.
‫And so the idea here is that with Fargate,
‫we don't manage any EC2 instances
‫and so it is easier to use.
‫So before with ECS, we first created our EC2 instances,
‫but with Fargate, we don't.
‫But both services will allow you
‫to run docker container on AWS.
‫Finally, for storing these docker images,
‫so that it can be run on the AWS,
‫you need to use a container registry.
‫And for this, we can use ECR,
‫which stands for elastic container registry.
‫It is a private docker registry on AWS,
‫and this is where you're going to store you docker images
‫so that it can be run
‫by the ECS service or the Fargate service.
‫So the second example,
‫we have ECR and Fargate.
‫We're going to store our images of our application
‫onto Amazon ECR, and then Fargate will be able
‫to look at these images and create a container from them,
‫and run them directly on the Fargate service.
‫So it could be one container here, one container there,
‫but this is ECR, so we could have multiple images as well,
‫creating different containers on Fargate.
‫So that's it.
‫Very, very simple.
‫So remember, ECS versus Fargate versus ECR,
‫that's all you need to know going into the exam.
‫I hope you liked it,
‫and I will see you in the next lecture.