Okay, so let's go into the ECS console,
to start using the Elastic Container Service.
So what I'm going to do is going to get started,
and then we have to create our first cluster.
So let's create a cluster,
and this is a cluster we're going to give so name,
so DemoCluster.
We need to choose a VPC,
which was the default VPC,
as well as subnets,
and this is where our resources are going to be deployed.
Now we have different choices for the infrastructure.
And as you can see,
the number one that is selected by default
is to use AWS Fargate.
And Fargate is a serverless type of infrastructure
in which you pay as you go,
which is very helpful to run just instance,
ECS tasks on the go.
But if you wanted to manually provide Amazon EC2 instances,
you could as well,
and therefore you would need to create a new ASG,
then you would need to choose an operating system,
such as Amazon Linux two,
an instance type, for example,
your t2micro instances,
your desired capacity for your ASG,
so between zero and five,
and zero and one.
And then if you,
if you want a SSH or not into them.
So for the sake of this hands on,
I can create one and show you what it's like.
So I'll just choose zero and maximum five.
And also we could specify external instances
using ECS anywhere.
This requires manual configuration,
and need to register your servers
maybe from on premises,
onto your ECS cluster.
So monitoring is optional,
and tags are optional,
so I'll leave it as is.
So let's create this cluster.
And in this cluster,
as you remember,
I've created both the Fargate launch type,
which was selected by default,
as well as the EC2 launch type.
And to show you how the EC2 launch type works,
if I go into the auto scaling groups,
and then on the left hand side,
I will click on auto scaling groups right here,
and it's showing,
as you can see,
there was an auto scaling group created for me,
called Infra ECS Cluster.
And desired capacity is zero,
main capacity, zero,
maximum capacity, five.
And this was created directly by my ECS cluster,
and the creation is in progress.
And what this cluster has,
will have maybe EC2 instances
for me to launch tasks on.
So as you can see,
it's in three availability zones.
So we know that the ECS tasks
are going to be launched across three AZ.
And what I'm going to do now is just wait
for this cluster to be created,
which is the case now.
So what I can do now is explore this DemoCluster.
So if I click on it,
I'm in the DemoCluster,
and I can go to services,
there are zero tasks,
there are zero because we haven't launched anything yet.
And then we go to the more interesting infrastructure.
So if you go here to the infrastructure,
we have three capacity providers in this ECS cluster.
The first one is Fargate,
that means that we can launch Fargate task
onto our ECS cluster.
The second one is Fargate Spot,
that means that we can launch Fargate task in spot mode,
so like spot instances for EC2.
And the last one is a ASG Provider,
and this one means that we can launch EC2 instances
in this cluster directly through this ASG.
So it's managed scaling right now,
and the current size is zero,
but I can change it if I wanted to.
So let me show you what it would look like.
I go here,
I go to details,
and I would edit the desired capacity to be one,
just to show you what it's like.
So what's going to happen out of this is
that an EC2 instance is going to be created, okay?
And when it's created,
it's going to register itself into the DemoCluster.
And then I will see it under container instances.
That means that when we create an ECS task,
it can either be launched on a Fargate,
or Fargate Spot capacity provider,
or it can be launched on the container instances
that I will have launched as part of this ASG.
So what I'm going to do now
is just wait for this instance
to be in the running state,
and registered into my ECS cluster.
So let me refresh now.
My instance is in service,
and its t2micro,
and if I go back into my Amazon ECS cluster,
it is registered as a Container instance
that is currently of course,
running zero tasks,
and has 1024 CPU available,
and 982 memory available.
So this is giving me the capacity of this instance,
and I can launch use,
as you'll see task on it
until the capacity runs out.
So we're good to go.
So we have an ECS cluster.
We've seen two capacity providers,
I mean three.
We've seen Container instances.
So now let's go ahead and do run our first service,
and I will see you in the next lecture to do that.