What is the difference between Amazon ECS and Amazon EC2

421    Asked by ColemanGarvin in Python , Asked on Jul 21, 2021

 Is ECS just a docker install in EC2? If I already have a EC2, then I start a ECS, does it mean I have two instance?

Answered by Gareth Beacham

EC2 allows you to launch individual instances which you can use for pretty much whatever you like whereas ECS is a container service, which means it will launch instances that will be ready to launch container applications.



 ECS allows you to launch a cluster of machines that will serve as the deployment ground of your container apps, allowing you to treat all instances in the cluster as one big instance available for your container workload.

ECS vs EC2: The main distinction between the two services is that with EC2 you have to manage each instance separately in whatever method you choose (manually, using a CM tool or any other way) - deploy your applications and maintain the connection between the servers yourself.

And to answer your question - You can start an ECS cluster with no instances in it, but then it won't be able to run anything on it. Once you register an EC2 instance inside an ECS cluster, containers are ready to run in it. So the bottom line is - you can use both ECS and EC2 with only one instance, but that is not the actual use case these services were built for.



Your Answer

Interviews

Parent Categories