There are two different charge models for Amazon Elastic Container Service (ECS).
Fargate Launch Type Model
With Fargate, you pay for the amount of vCPU and memory resources that your containerized application requests. vCPU and memory resources are calculated from the time your container images are pulled until the Amazon ECS Task* terminates, rounded up to the nearest second. A minimum charge of 1 minute applies.
See detailed pricing information on the AWS Fargate pricing page.
EC2 Launch Type Model
There is no additional charge for EC2 launch type. You pay for AWS resources (e.g. EC2 instances or EBS volumes) you create to store and run your application. You only pay for what you use, as you use it; there are no minimum fees and no upfront commitments.
See detailed pricing information on the Amazon EC2 pricing page.