4 ms·
Your mileage may vary, but I think in majority of the cases Fargate is going to be significantly more expensive than Lambda.
by sakopov 3y ago
Your mileage may vary, but I think in majority of the cases Fargate is going to be significantly more expensive than Lambda.
- nameless912 3y agoBut at low request volumes, either is a rounding error to a medium size enterprise, and for personal projects IMO Lambda is a huge PITA.
- hooverd 3y ago/shill The AWS SAM CLI smooths over a lot of Lambda's rough points. /unshill
- nameless912 3y agoGasp, a shill?? I totally believe you, I just can't see how it becomes easier than chucking a container on Fargate or something. Maybe I've just been scarred by lambda rat's nests in the past.
- hooverd 3y agoYeah, the "proper" way to do Lambdas, shown in so many fancy architecture diagrams, is a rat's nest. I don't like APIs on Lambda unless you can shove them into one container with a catchall proxy on API Gateway. They really shine if you're processing SQS messages or EventBridge events. If you aren't using other AWS services and aren't cost engineering, then Lambdas probably aren't worth the headache.
- iends 3y agoThe serverless framework makes lambda for side projects a breeze. CDK for everything else.
- meowtimemania 3y agoOne of lambda's ideal use cases is personal projects. Personal projects usually serve very few requests so lambda's ability to scale to zero results in cost savings.
- cdelsolar 3y agoI don't think that's actually true on a GB-second basis (memory * CPU)?
- hooverd 3y agoThe cost efficiency of Lambda vs Fargate/EC2 ECS/one of the dozen other ways to run containers on AWS plummets as your RPS goes up.
- Olreich 3y agoLambda is the most expensive thing you can do if you have more than 25% utilization. Fargate is extremely close to modern on-demand EC2 pricing (m7a family).
- makestuff 3y agoYeah you can run Fargate on EC2 now as well to optimize cost even further.
- oarmstrong 3y agoFargate on EC2? Sorry you’ve lost me, I understood Fargate to be a layer of AWS managed compute for ECS or EKS deliberately instead of EC2.
- makestuff 3y agohttps://lumigo.io/blog/comparing-amazon-ecs-launch-types-ec2-vs-fargate/ https://lumigo.io/blog/comparing-amazon-ecs-launch-types-ec2... You can now specify your launch type to be an ec2 instance. This has the benefit of lower cost but you are responsible for managing the instances ex: security patches, etc.
- oarmstrong 3y agoRight, running ECS on EC2, not Fargate on EC2. When ECS launched it only had the EC2 launch type (where as you said you must manage your machines). Fargate then came along for both ECS and EKS where Amazon managed the machines for you.