Get a quote

Running AWS ECS and Fargate Under $100 Per Month for Early-Stage SaaS Startups

Most early-stage SaaS startups in Lebanon and the MENA region overpay for AWS by 3x to 5x in their first year. The reason is not that AWS is expensive - it is that default configurations optimize for availability and simplicity, not cost. This guide covers the specific ECS and Fargate settings that actually move the monthly bill.

Most early-stage SaaS startups in Lebanon and the MENA region overpay for AWS by 3x to 5x within their first year. The reason is not that AWS is expensive - it is that default configurations optimize for availability and simplicity, not cost. This guide covers the specific ECS and Fargate settings that actually move the monthly bill for a typical startup running two to five services.

What actually drives the Fargate bill

Fargate pricing is per vCPU-hour and per GB-hour. A task running 0.25 vCPU and 512 MB RAM continuously for a month in the eu-west-1 region costs roughly $11 per month. That sounds manageable until you realize most startups are running four to eight tasks at minimum - API server, worker, scheduler, maybe a separate auth service - and that number compounds quickly.

The other cost driver that catches teams off guard is data transfer. Fargate tasks communicating with services outside the VPC, or egressing to the internet, pay standard AWS data transfer rates. For a backend that calls external APIs frequently, this can add $20 to $40 per month before you notice.

NAT Gateway is the line item that surprises the most teams. Fargate tasks in a private subnet need a NAT Gateway to reach the internet. NAT Gateway charges per hour of existence ($0.045/hour in most regions) plus per GB of data processed. A NAT Gateway running continuously costs roughly $32 per month in gateway fees alone, before any traffic.

Fargate Spot: the real numbers

Fargate Spot runs your containers on spare AWS capacity at a 70% discount. The tradeoff is that AWS can terminate Spot tasks with a two-minute warning when capacity is needed elsewhere.

For a startup SaaS product, Fargate Spot is suitable for worker tasks, background jobs, and any processing that can be checkpointed and restarted. It is not suitable for your primary API service if you need consistent availability guarantees.

A common pattern that cuts costs significantly: run your API service on regular Fargate capacity, and move your worker fleet entirely to Fargate Spot. If your workers handle tasks idempotently, a Spot interruption means a task is retried, not lost.

With this split, a startup running one API task at 0.5 vCPU / 1 GB and four worker tasks at 0.25 vCPU / 512 MB each pays roughly:

  • API task (regular Fargate): $22/month
  • Worker tasks (Fargate Spot): $6/month
  • Total compute: ~$28/month

Without Spot, the same configuration costs roughly $66/month in compute.

Right-sizing tasks before scaling horizontally

The most common Fargate cost mistake is over-provisioning task sizes. A typical Go or Node.js API server for a startup SaaS product needs far less than the 1 vCPU / 2 GB that many teams default to.

The correct approach: deploy with the smallest feasible task size, instrument your memory and CPU utilization in CloudWatch, and upsize only when metrics show sustained utilization above 70%. Starting at 0.25 vCPU / 512 MB and scaling up based on data is more economical than guessing high and leaving idle capacity running indefinitely.

For Go services specifically, the memory footprint is genuinely small. A Go HTTP service handling 100 concurrent requests typically consumes 30 to 80 MB of RAM. A 512 MB task allocation has significant headroom. Fargate does not allow you to pay for exactly 83 MB - you pay for one of the fixed allocation sizes - but choosing the smallest size that covers your real utilization is meaningful at startup economics.

ECS Service Auto Scaling vs scheduled scaling

Service Auto Scaling in ECS adjusts your desired count based on CloudWatch metrics, typically CPU or request rate. It is the right tool for unpredictable traffic patterns.

Scheduled scaling is better for predictable traffic patterns. If your SaaS product has Lebanese or MENA business users, traffic almost certainly drops to near zero between midnight and 7am local time. A scheduled scale-down to one task during off-hours and a scheduled scale-up before business hours starts is free to configure and saves compute costs.

For a service that can run on a single task during off-hours, scheduled scaling from three tasks down to one task overnight reduces compute costs by two-thirds for those hours. At typical Lebanese SaaS traffic patterns (roughly 10 to 12 hours of active traffic per day), scheduled scaling can reduce compute costs by 30 to 40% versus always running at peak task count.

Eliminating unnecessary NAT Gateway costs

Several patterns eliminate NAT Gateway entirely or reduce its traffic significantly.

VPC Endpoints for AWS services. If your Fargate tasks communicate with S3, DynamoDB, SQS, or ECR (to pull container images), VPC Endpoints route that traffic through the AWS private network instead of through NAT Gateway. Interface endpoints for ECR and SQS have hourly costs, but gateway endpoints for S3 and DynamoDB are free. For teams pulling large container images from ECR frequently, this eliminates a meaningful chunk of NAT Gateway data costs.

Move tasks to public subnets with direct internet access. Fargate tasks can run in public subnets and receive public IP addresses, which eliminates the need for NAT Gateway entirely. The tradeoff is that your tasks are directly reachable from the internet on any open port. For a startup where security posture is managed through security groups and your services do not have ports exposed unnecessarily, public subnets are a reasonable choice at the cost-sensitive early stage.

Reduce external API call frequency. If your backend makes frequent calls to external APIs - payment processors, SMS gateways, third-party data sources - each call generates NAT Gateway traffic. Batching calls, caching responses aggressively, and reducing polling frequency all reduce NAT egress.

When to move from Fargate to EC2-backed ECS

Fargate is more expensive per unit of compute than EC2. The tradeoff is operational simplicity: no EC2 instance management, no patching, no capacity planning for the underlying hosts.

The crossover point where EC2-backed ECS becomes economically justified is roughly when you need consistent utilization across 4 to 8 vCPUs. Below that level, the operational overhead of managing EC2 instances is not worth the savings. Above that level, the cost difference is significant enough to justify the additional complexity.

For a startup running a Go SaaS backend that has found product-market fit and is growing rapidly, the migration from Fargate to EC2-backed ECS is a planned infrastructure event, not an emergency. The right time to plan it is when your Fargate bill exceeds $300 to $400 per month and is growing, not when you are still under $100.

Building cost observability before you need it

AWS Cost Explorer is free and essential. Set up a budget alert at $80 and $100 per month during the early stage so cost increases are visible in real time, not discovered at the end of the billing cycle.

Tag every ECS service, task definition, and related resource with a cost allocation tag. Environment: production, Service: api, Service: worker. Cost Explorer can then break down spend by service, which makes it clear whether cost increases are coming from compute, data transfer, or other line items.

For MENA-based startups using AWS regions close to their users - eu-west-1 (Ireland), me-south-1 (Bahrain), or me-central-1 (UAE) - pricing varies between regions. me-south-1 and me-central-1 are typically 10 to 20% more expensive than eu-west-1 for Fargate. If your users tolerate additional latency, eu-west-1 is the economical choice for early-stage products serving Lebanon and the Gulf.

Key lessons from production

Fargate Spot for worker tasks is the single highest-impact change for most startups. It requires idempotent task design but saves 70% on worker compute with minimal architecture change.

Scheduled scaling for predictable MENA business traffic patterns is free and reduces compute costs by 30 to 40%. Configure it before you optimize anything else.

NAT Gateway is often the hidden cost that is larger than the compute bill. Audit your NAT Gateway usage in the first month and implement S3/DynamoDB VPC Endpoints immediately.

Right-size tasks based on observed CloudWatch metrics, not on assumed requirements. Go services in particular run well under the memory allocations most teams start with.

Free PDF Download

Enjoying this article?

Enter your email and get a clean, formatted PDF of this article - free, no spam.

Free. No spam. Unsubscribe any time.

Not sure where to start?

Voxire designs and manages AWS ECS infrastructure for SaaS teams in Lebanon and the MENA region, including cost optimization reviews for existing deployments. If your AWS bill is growing faster than your revenue, we can help identify where the spend is going and what to do about it.

https://voxire.com/get-a-quote/

Back to blog
Chat on WhatsApp