3 ms·
I haven't checked, but I'm willing to bet that the costs for a one-time Fargate task and Lambda are similar enough that Fargate will be vastly simpler. Both can
by 0xbadcafebee 5y ago
I haven't checked, but I'm willing to bet that the costs for a one-time Fargate task and Lambda are similar enough that Fargate will be vastly simpler. Both can use containers, but Fargate is more explicitly built to just run a container without managing any server. And there's EKS Fargate, too.
Fargate Spot pricing is $0.012144 (vCPU Hour) + $0.0013335 (GB hour) + $0.000111 (Ephermeral Storage hour). Pricing is per second with a 1-minute minimum. So for one hour of compiling on 1 vCPU, 1GB ram, 1GB storage, that's $0.0135885, to run any old Docker container.
Lambda cannot execute for longer than 900000 milliseconds, or 15 minutes. For 15 minutes at 1GB for 1 request, that's $0.02. For 4 requests (1 hour) that's $0.06.