Softwr

Software · head to head

Amazon ECS vs AWS CloudFormation

Amazon ECS logo

Amazon ECS

Software

AWS managed container orchestration, free to use, billed for Fargate or EC2 compute

From
On request
Free plan
No
AWS CloudFormation logo

AWS CloudFormation

Software

Declarative infrastructure as code for AWS, free for AWS resources

From
Free
Free plan
Yes

The short version

  • Amazon ECS is a fully managed container orchestration service on AWS.
  • AWS CloudFormation is free; Amazon ECS prices on request.
  • Only Amazon ECS lists fargate serverless containers; only AWS CloudFormation lists stacks and templates.
  • Where Amazon ECS falls short: runs only on AWS, with no portability to other clouds.
  • Where AWS CloudFormation falls short: it only manages AWS, so multi-cloud estates need Terraform or Pulumi alongside it.

How do Amazon ECS and AWS CloudFormation differ?

Amazon ECS and AWS CloudFormation differ on starting price (On request against Free), pricing model and free tier (No against Yes). Only the attributes on which Amazon ECS and AWS CloudFormation actually diverge.

Attributes where Amazon ECS and AWS CloudFormation differ
AttributeAmazon ECSAWS CloudFormation
Starting priceOn requestFree
Pricing modelUsage-basedNo charge for AWS resource types; extensions per handler operation
Free tierNoYes
PlatformsWebWeb, Linux, macOS, Windows

Which features does each one have?

They share no listed features; 8 appear only for Amazon ECS and 6 only for AWS CloudFormation. Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.

Only in Amazon ECS

  • Fargate serverless containers
  • EC2 launch type
  • ECS Anywhere for on-premises and edge
  • ECS Managed Instances
  • IAM-based access control
  • Automated patching
  • Encryption in transit and at rest
  • Spot capacity support

Only in AWS CloudFormation

  • Stacks and templates
  • Change sets
  • Drift detection
  • StackSets
  • Rollback
  • Registry extensions

What is each one used for?

Amazon ECS is most often brought in for running containerised web services on AWS; AWS CloudFormation for recreating identical dev, staging and production environments on AWS. The jobs each tool is most often brought in to do.

Amazon ECS

  • Running containerised web services on AWSnot AWS CloudFormation
  • Batch jobs on Spot capacitynot AWS CloudFormation
  • Serverless containers without managing serversnot AWS CloudFormation
  • Hybrid workloads using ECS Anywherenot AWS CloudFormation

AWS CloudFormation

  • Recreating identical dev, staging and production environments on AWSnot Amazon ECS
  • Deploying one baseline of security resources across many accounts with StackSetsnot Amazon ECS
  • Serverless applications packaged with AWS SAMnot Amazon ECS
  • Previewing and auditing infrastructure changes through change setsnot Amazon ECS

Where do Amazon ECS and AWS CloudFormation fall short?

Amazon ECS's most cited limit: runs only on AWS, with no portability to other clouds. AWS CloudFormation's: it only manages AWS, so multi-cloud estates need Terraform or Pulumi alongside it. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.

Amazon ECS

  • Runs only on AWS, with no portability to other clouds
  • Task definitions and APIs are AWS-specific, unlike Kubernetes
  • Costs combine ECS-adjacent services such as EC2, load balancers and IPv4
  • Smaller ecosystem of third-party tooling than Kubernetes

AWS CloudFormation

  • It only manages AWS, so multi-cloud estates need Terraform or Pulumi alongside it
  • Raw templates are verbose and hard to reuse, which is why many teams add CDK on top
  • A failed update can leave a stack in a stuck state such as UPDATE_ROLLBACK_FAILED that needs manual intervention
  • New AWS features sometimes arrive in CloudFormation after the console and API, so you wait or script around the gap
  • Deleting a stack deletes its resources, so a mistaken delete of a stack with data needs DeletionPolicy discipline

How much do Amazon ECS and AWS CloudFormation cost?

AWS CloudFormation is free to use. Plan by plan below, from each vendor's own pricing page.

Amazon ECS

On request

No published plan breakdown. See the Amazon ECS review.

AWS CloudFormation

Free
  • AWS resource typesFree
    • No additional charge for using CloudFormation with AWS resources
    • You pay for the resources the stack creates
  • Third-party extensionsOn request
    • $0.0009 per handler operation, first 1,000 per month free
    • $0.00008 per second of handler duration beyond 30 seconds

Which should you pick?

Choose Amazon ECS if

  • You need fargate serverless containers.
  • You also want ec2 launch type.

Choose AWS CloudFormation if

  • You need stacks and templates.
  • You want to start without paying.
  • You work on Web, Linux, macOS, Windows.
  • You also want change sets.

Questions people ask

Is Amazon ECS or AWS CloudFormation better?
It depends on the job. Amazon ECS fits running containerised web services on AWS; AWS CloudFormation fits recreating identical dev, staging and production environments on AWS. Amazon ECS starts at On request and AWS CloudFormation at Free.
Which is cheaper, Amazon ECS or AWS CloudFormation?
AWS CloudFormation has a free tier; the other does not. Paid plans start at On request for Amazon ECS and Free for AWS CloudFormation.
Does Amazon ECS or AWS CloudFormation run on more platforms?
Amazon ECS runs on Web. AWS CloudFormation runs on Web, Linux, macOS, Windows.
Can I use AWS CloudFormation for free?
Yes. AWS CloudFormation has a free tier, so you can try it without paying. Amazon ECS starts at On request.
What is Amazon ECS best used for?
Amazon ECS is most often used for running containerised web services on aws, batch jobs on spot capacity, serverless containers without managing servers, hybrid workloads using ecs anywhere. Of those, running containerised web services on aws and batch jobs on spot capacity are not what AWS CloudFormation is typically brought in for.
What can Amazon ECS do that AWS CloudFormation cannot?
Amazon ECS covers Fargate serverless containers, EC2 launch type, ECS Anywhere for on-premises and edge, ECS Managed Instances. AWS CloudFormation covers Stacks and templates, Change sets, Drift detection, StackSets.

Answered from the vendors’ own pages

Amazon ECS: Does ECS cost extra?

No. There is no additional charge for Amazon ECS orchestration; you pay for the compute and resources your containers use.

Source
AWS CloudFormation: Does CloudFormation cost money?

Not for AWS resource types. You pay for the resources it creates; third-party extensions are billed at $0.0009 per handler operation after 1,000 free.

Amazon ECS: Can ECS run outside AWS?

ECS Anywhere runs containers on registered on-premises instances at $0.01025 per instance per hour.

Source
AWS CloudFormation: CloudFormation or Terraform?

CloudFormation is AWS-only with state managed by AWS; Terraform spans many providers and keeps its own state.

Amazon ECS: What compute options does ECS offer?

AWS Fargate, Amazon EC2 and ECS Anywhere, plus ECS Managed Instances.

Source
AWS CloudFormation: How does CDK relate?

CDK lets you write infrastructure in a programming language and synthesises CloudFormation templates.

Share

Related pages

Other head to heads