Reduce AWS Fargate costs with these tips
Serverless compute for containers
AWS Fargate cost saving tips
Optimize your AWS Fargate costs with these tips
Fargate Spot
Use Fargate Spot, a spare capacity in the AWS cloud, to run workloads at a lower cost. Fargate Spot instances are between 40% and 70% cheaper than on demand workloads. Fargate Spot is currently only available for Linux X86 workloads. You must also be aware that Fargate spot instances can be reclaimed a maximum of two minutes by AWS.
Adopt Savings Plans
Opt into AWS Savings Plans for flexible and significant cost savings over a term. These cost savings can be significant, and these cost savings can also be applied to EC2 and Lambda. Most customers opt for the no-upfront option for three years. It is best to fully utilize savings plans and stack them for maximum effect.
Rightsize Containers
The biggest part of your hourly costs is vCPU’s. If you enable Container Insights on the ECS cluster, you can view the CPU usage of your tasks. A good rule of thumb is to half the instance vCPU if the average CPU usage is below 40% for a whole week. Also only set the memory component on the top task level (not on container level).
Service information & pricing
About AWS Fargate
- About AWS Fargate
-
AWS Fargate is a serverless engine for container apps, offering workload isolation & cost optimization. No need for server management, compatible with Amazon ECS & EKS, supports various CPU architectures, ideal for web apps, AI/ML, and data processing. AWS Fargate is a great solution if you do not want to manage any Docker infrastructure. You just run your containers and the hosting is managed for you.
- AWS Fargate pricing
-
AWS Fargate's cost depends on vCPU, memory, OS, CPU architecture, and storage used. Prices vary based on resources requested. Windows OS, storage resources, and ARM CPU are only for Amazon ECS. Costs accrue from the time of container image download until task/pod termination. If you improve ECR pull times your costs will also be lower (use a VPC endpoint).