You are on page 1of 1

What is the difference between Fargate and EC2?

In EC2 you actually own the instances where the code/image is run.
Where else in Fargate, based on your ECS/EKS configuration i.e how
much ram/cpu needed for the container AWS allocates a machine
(that is not owned by you but a shared fleet across AWS) and runs
your container on it. It is sort of serverless with respect to
container based application that you can think of.

Summary: In fargate you dont own the ec2 instance but only specify
the image and system specification (CPU/RAM) and AWS automatically
runs them on shared fleet of instances. You don’t need to manage
EC2 when using fargate that is the advantage.

How many EC2 instances can be used in a VPC?

You can run any number of Amazon EC2 instances within a VPC, so
long as your VPC is appropriately sized to have an IP address assign
ed to each instance. You are initially limited to launching 20
Amazon EC2 instances at any one time and a maximum VPC size of /16
(65,536 IPs).If you would like to increase these limits, then you
have to raise a case with AWS support.

You might also like