To containerize in AWS or not: the cost perspective

June 15, 2021 – Samuli Seppänen

I recently checked the pricing model for Amazon Fargate to see if migrating a fair number of EC2 instance-based workloads to containers would save money. In theory this should have been the case, as a container has less "fat" compared to a full virtual machine. In this case the workload itself was perfectly suited for a container: a single process with single configuration file that was mostly network-bound running on t3.micro instances.

Rather surprisingly using Fargate would cost almost as much as running the same workload on EC2 virtual machines even when minimizing the container specs. The numbers below are based on the AWS pricing calculator. The cost for ten t3.micro instances (2 vCPU, 1GB mem) with 10GB EBS gp2 SSD volumes each in us-west-1 region:

  • Amazon Elastic Block Storage (EBS) pricing (monthly): 36.00 USD
  • Amazon EC2 On-Demand instances (monthly): 90.52 USD
  • Total monthly cost: 126.52 USD

The cost could be roughly halved by moving to t3.nanos.

AWS pricing calculator does not support Fargate, so these numbers are based on Fargate pricing page based on ten services with minimum specs (0.25 vCPU, 0.5GB memory):

  • vCPU cost (monthly): 83.81 USD
  • Memory cost (monthly): 5.52 USD

So Fargate is somewhat cheaper, but in return you're getting 1/8th of the vCPUs and 1/2 of the memory. Of course an EC2 instance is running a full operating system and has more overhead than a container, but it still seems unlikely that you could actually save money with Fargate especially in CPU-bound workloads. Also splitting support processes into sidecar containers would increase cost further.

With this quick analysis it smells like the main benefactor here is AWS who can run more workloads on less hardware and avoid passing those savings to their customers. But as always with AWS understanding real production-load costs is next to impossible, because everything is charged separately.

Want to talk to an expert?

If you want to reach us, just send us a message or book a free call!
Categories

Tags

#aad #Access #acl #alertmanager #ansible #ansible module development #Apache #API #augeas #authentication #authorization #automation #automatization #aws #azure #backup #bash #bitbucket #buildbot #cache #centos #cloud #cloud-init #cloudflare #cloudfront #cluster #connectionsJpa #control repo #custom fact #database #debian #devops #digital sovereignty #DNS #docker #domain mode #duplo #ejabberd #email #encryption #erb #europe #eyaml #fabric #facter #facts #fargate #fedora #file #finnish #foreman #freeipa #git #github #gitlab #gnome #google #grafana #hammer #hiera #IAM #import #infinispan #Infrastructure as Code #ipmi #irc #jboss #jdk #jenkins #JMESPath #kanban #keycloak #librarian-puppet #librenms #linkedin #Linux #Location #loop #marketing #mautic #Mellon #mfa #monitoring #mysql #nagios #network-manager #oauth #oauth2 #office365 #open source #openvpn #oxygen #packer #paranormal #pdk #people #php #pkcs7 #pomodoro #Powershell #preseed #presentation #profiles #prometheus #provisioning #puppet #puppet-bolt #puppet-litmus #puppetboard #puppetdb #Puppetfile #puppetserver #puppet types and providers #pxeboot #qemu #quality #r10k #recruitment #redirect #Restrict #Reverse Proxy #roles #rspec #ruby #SAML #sem #shell #showsql #snmp #snmpd #software developement #spam #ssh #sso #standardization #systemd #systemd-resolved #teams #terraform #ubuntu #user-data #vagrant #vanity awards #variable #vim #virtualbox #visualstudio #webdevelopment #wildfly #Windows #wireguard #wordpress #workflow #x11 #xmpp #zimbra
We are
 Puppeteers
menucross-circle