That’s a good question! VPC is free (NAT gateways and Elastic IPs you may have to pay for), EBS is pretty cheap, and ECS uses EC2 instances underneath the hood, so if you pay for reserved or spot pricing it’s less of an issue. You can stick multiple containers on an EC2 instance, but if you need to connect them together you may need something like DNS service discovery for those services to talk to each other, which is a PITA. RDS is the most expensive. Everything else is like $5 / mo., RDS is $20-50 / mo.
However, since RDS is merely a data sink for this stack, you don’t have to have RDS. You can use something like ElephantSQL’s free plan and punch in the PostgreSQL URI into the custom db compute CloudFormation template. Then it’d be $5 / mo. total.
Hmm, correction…I’m using t3.medium instance which is $30 / mo., but you can switch that to t3.nano which would be $3.70 / mo., but you’d have to adjust the “CPU / memory units” that ECS uses to allocate for each container on the VM.
The principle should be the same though, you should be able to downscale and not suffer any other behaviour differences except slowness / capacity issues.
About how much it cost per month to run VPC, RDS, EBS and ECS? I think I checked once only for RDS for a hobby project and it was a bit expensive.
That’s a good question! VPC is free (NAT gateways and Elastic IPs you may have to pay for), EBS is pretty cheap, and ECS uses EC2 instances underneath the hood, so if you pay for reserved or spot pricing it’s less of an issue. You can stick multiple containers on an EC2 instance, but if you need to connect them together you may need something like DNS service discovery for those services to talk to each other, which is a PITA. RDS is the most expensive. Everything else is like $5 / mo., RDS is $20-50 / mo.
However, since RDS is merely a data sink for this stack, you don’t have to have RDS. You can use something like ElephantSQL’s free plan and punch in the PostgreSQL URI into the custom db compute CloudFormation template. Then it’d be $5 / mo. total.
Thank you very much.
Hmm, correction…I’m using t3.medium instance which is $30 / mo., but you can switch that to t3.nano which would be $3.70 / mo., but you’d have to adjust the “CPU / memory units” that ECS uses to allocate for each container on the VM.
The principle should be the same though, you should be able to downscale and not suffer any other behaviour differences except slowness / capacity issues.