Softwr

Cloud · head to head

Amazon EC2 vs AWS WAF

Amazon EC2 logo

Amazon EC2

Cloud

Resizable virtual server compute service on AWS

From
Free
Free plan
Yes
AWS WAF logo

AWS WAF

Cloud

Managed web application firewall for CloudFront, load balancers and APIs on AWS

From
$5/month
Free plan
No

The short version

  • Amazon EC2 is free; AWS WAF starts at $5/mo.
  • Only Amazon EC2 lists over 1,000 instance types; only AWS WAF lists web ACLs and rules.
  • Where Amazon EC2 falls short: cost forecasting is complex across purchase options and instance types.
  • Where AWS WAF falls short: it only attaches to a fixed list of AWS resources, so applications hosted outside AWS or behind another CDN cannot use it.

How do Amazon EC2 and AWS WAF differ?

Amazon EC2 and AWS WAF differ on starting price (Free against $5/month), pricing model and free tier (Yes against No). Only the attributes on which Amazon EC2 and AWS WAF actually diverge.

Attributes where Amazon EC2 and AWS WAF differ
AttributeAmazon EC2AWS WAF
Starting priceFree$5/month
Pricing modelUsage-basedPer web ACL, per rule and per million requests
Free tierYesNo
PlatformsWeb, Linux, Windows, macOSWeb

Not yet recorded: category for AWS WAF.

Which features does each one have?

They share no listed features; 7 appear only for Amazon EC2 and 6 only for AWS WAF. 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 EC2

  • Over 1,000 instance types
  • Intel, AMD and Arm (Graviton) processors
  • Per-second billing
  • Spot Instances and Savings Plans
  • Dedicated Hosts
  • EC2 Mac instances
  • Nitro System isolation

Only in AWS WAF

  • Web ACLs and rules
  • Managed rule groups
  • Bot Control
  • Fraud Control
  • Rate-based rules
  • Logging

What is each one used for?

Amazon EC2 is most often brought in for hosting web applications and APIs; AWS WAF for rate limiting login and API endpoints that sit behind CloudFront. The jobs each tool is most often brought in to do.

Amazon EC2

  • Hosting web applications and APIsnot AWS WAF
  • Running GPU and machine learning workloadsnot AWS WAF
  • Building and signing macOS appsnot AWS WAF
  • Bursting capacity with Spot Instancesnot AWS WAF

AWS WAF

  • Blocking SQL injection, cross-site scripting and known bad inputs in front of an Application Load Balancernot Amazon EC2
  • Rate limiting login and API endpoints that sit behind CloudFrontnot Amazon EC2
  • Adding bot detection to a retail site already hosted on AWSnot Amazon EC2
  • Applying one set of WAF rules across many accounts through AWS Firewall Managernot Amazon EC2

Where do Amazon EC2 and AWS WAF fall short?

Amazon EC2's most cited limit: cost forecasting is complex across purchase options and instance types. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.

Amazon EC2

  • Cost forecasting is complex across purchase options and instance types
  • Spot instances carry no SLA and can be reclaimed on two minutes' notice
  • Instance-store data is lost when an instance stops or terminates
  • You manage OS patching, scaling and security configuration

AWS WAF

  • It only attaches to a fixed list of AWS resources, so applications hosted outside AWS or behind another CDN cannot use it
  • Charges come from several meters at once (web ACL, rules, rule groups, requests, logging, and per-feature fees), so predicting a bill needs a worksheet rather than a single price
  • Account Takeover Prevention and Fraud Control start at $1,000 per million requests, so protecting a busy login endpoint can cost more than the web ACL itself
  • Managed rules ship in count-first workflows and generate false positives on unusual payloads, so someone has to review logs and tune exclusions
  • Request body inspection is capped by default, and inspecting beyond the limit or using more than the default capacity units carries extra per-request charges

How much do Amazon EC2 and AWS WAF cost?

Amazon EC2 is free to use; AWS WAF starts at $5/mo. Plan by plan below, from each vendor's own pricing page.

Amazon EC2

Free

No published plan breakdown. See the Amazon EC2 review.

AWS WAF

$5/month
  • Pay-as-you-go$5/mo
    • $5.00 per web ACL per month
    • $1.00 per rule and $1.00 per rule group per month
    • $0.60 per million requests
  • Bot Control$10/mo
    • $10.00 per web ACL per month subscription
    • Common: $1.00 per million requests, first 10 million free
    • Targeted: $10.00 per million requests, first million free
  • Account Takeover and Fraud Control$10/mo
    • $10.00 per web ACL per month per rule group
    • $1,000 per million requests for the first 2 million, falling to $50 per million at the highest tier

Which should you pick?

Choose Amazon EC2 if

  • You need over 1,000 instance types.
  • You want to start without paying.
  • You work on Web, Linux, Windows, macOS.
  • You also want intel, amd and arm (graviton) processors.

Choose AWS WAF if

  • You need web acls and rules.
  • You also want managed rule groups.

Questions people ask

Is Amazon EC2 or AWS WAF better?
It depends on the job. Amazon EC2 fits hosting web applications and APIs; AWS WAF fits blocking SQL injection, cross-site scripting and known bad inputs in front of an Application Load Balancer. Amazon EC2 starts at Free and AWS WAF at $5/month.
Which is cheaper, Amazon EC2 or AWS WAF?
Amazon EC2 has a free tier; the other does not. Paid plans start at Free for Amazon EC2 and $5/month for AWS WAF.
Does Amazon EC2 or AWS WAF run on more platforms?
Amazon EC2 runs on Web, Linux, Windows, macOS. AWS WAF runs on Web.
Can I use Amazon EC2 for free?
Yes. Amazon EC2 has a free tier, so you can try it without paying. AWS WAF starts at $5/month.
What is Amazon EC2 best used for?
Amazon EC2 is most often used for hosting web applications and apis, running gpu and machine learning workloads, building and signing macos apps, bursting capacity with spot instances. Of those, hosting web applications and apis and running gpu and machine learning workloads are not what AWS WAF is typically brought in for.
What can Amazon EC2 do that AWS WAF cannot?
Amazon EC2 covers Over 1,000 instance types, Intel, AMD and Arm (Graviton) processors, Per-second billing, Spot Instances and Savings Plans. AWS WAF covers Web ACLs and rules, Managed rule groups, Bot Control, Fraud Control.

Answered from the vendors’ own pages

Amazon EC2: How is Amazon EC2 billed?

Usage is billed in one-second increments with a minimum charge of 60 seconds, across all purchase options and Regions.

Source
AWS WAF: How much does AWS WAF cost per month?

On pay-as-you-go pricing it is $5.00 per web ACL and $1.00 per rule per month, plus $0.60 per million requests, per the AWS pricing page. Bot Control, fraud rules, CAPTCHA and logging are billed on top.

Amazon EC2: When did EC2 launch?

A limited public beta started on 25 August 2006, and the beta label was dropped on 23 October 2008 with the addition of an SLA.

Source
AWS WAF: Does AWS WAF work outside AWS?

No. It protects supported AWS resources such as CloudFront, Application Load Balancer and API Gateway. Origins elsewhere can be covered if they sit behind CloudFront.

Amazon EC2: How much can Spot Instances save?

AWS says Spot Instances save up to 90 percent versus On-Demand, and Savings Plans up to 72 percent. Wikipedia notes Spot can be reclaimed with two minutes' notice.

Source
AWS WAF: Is AWS WAF included with Shield Advanced?

Shield Advanced includes WAF usage for protected resources, up to 50 billion requests per month and 1,500 capacity units per web ACL, per the Shield pricing page.

Share

Related pages

Other head to heads