Thursday, 17 August 2017

Cost comparison of EC2 on-demand, EC2 Spotfleet and Lambda

Assuming we have an application that we are currently running on AWS autoscaling group with c3.large instances (2 vCPUs, 3.75GB) and one vCPU is always busy and we have always min 10 instances. Here is comparison of EC2 On-demand, EC2 Spotfleet and Lambda with assumption of equivalent of 10 instances and memory requirement of 1.5GB:
EC2 autoscaling On-demandEC2 autoscaling Spot (80% discount)Lambda
Architecture10 x c3.large instances10 instances in spot fleet (c3.large or larger)1.5GB function
Cost calculation per hour10 x $0.132 = $1.3210 x $0.132 x 0.2 = $0.26410 instances x 3600 seconds x
10 per sec x 0.000002501 x 1.2 lambda load
= 1.080432
Cost calculation per year$11,563.20$2,312.64$9,464.58
*Please note 20% load factor was added to Lambda , Based on amount of memory Lambda allocates proportional CPU power, network bandwidth, and disk I/O.

See also:
http://serverlesscalc.com/

No comments:

Post a Comment