What is the best way to minimise costs for an intermittently running environment?

Hopefully this is a very simple one to answer, but it involves billing (which is probably my least-understood part of AWS :wink: ).

I am having trouble finding the details on the AWS web console now, but I am sure when I previously subscribed to Datomic Cloud on the AWS Marketplace there was a cost listed both for the subscription itself, and separately for the cost of running the infrastructure on AWS (DynamoDB tables, S3 storage, instances. Mostly the instances).

My question is, if I have an environment that is only normally spun up intermittently, for load testing purposes, how can I minimise our costs when it is not running?

  • Am I right about there being a subscription cost on top of the infra cost (I mean, if not, how are Cognitect making money)?
  • If I have an active subscription on AWS Marketplace but I have no CloudFormation stacks active, will there be any charges against us relating to Datomic?
  • Is it enough to scale the autoscaling group down to 0 instances, or do I have to completely delete the CloudFormation stack, to avoid the subscription charge?
  • Do I have to delete the storage stack as well as the compute stack?
    • I know that the S3 bucket and DynamoDB tables are not deleted when the storage stack is torn down. Do I have to delete them, or can I keep them and the data they contain as long as the stack is gone?

Thanks

Dan

1 Like

Hi @Danm!

The total cost of running a Datomic system is the sum of the base price and the usage price .

  • The base price is the total monthly price of services that are billed per unit time, usually per hour (e.g. EC2 instances) or per month (e.g. KMS keys). A running Datomic system has a well-known base price based on its configuration, regardless of how the system used.
  • The usage price is the monthly total prices of services that are billed by some measure of utilization, e.g. data stored, data transferred, or autoscaled DDB provisioning.

You can check out the breakdown of pricing for the base price here:
https://docs.datomic.com/cloud/operation/growing-your-system.html#base-price

Your AWS bill will show line items for each AWS service separately.

Just to be extra clear, here are answers to each of your points in-line:

Am I right about there being a subscription cost on top of the infra cost (I mean, if not, how are Cognitect making money)?

Datomic is billed per unit time on the EC2 instances on the AMI. The monthly base prices for each supported instance size are shown in our docs and include the “Datomic price”. If these instances are not running you are not billed for their usage, therefore if you are not using your Datomic Cloud system there is no revenue for the Datomic team. Please keep your systems running so I can get paid! Just kidding! But I wanted to clarify that there is no subscription cost simply for being subscribed.

If I have an active subscription on AWS Marketplace but I have no CloudFormation stacks active, will there be any charges against us relating to Datomic?

No there will be no charge from subscription alone. You must have an active running stack to be billed for Datomic.

Do I have to delete the storage stack as well as the compute stack? I know that the S3 bucket and DynamoDB tables are not deleted when the storage stack is torn down. Do I have to delete them, or can I keep them and the data they contain as long as the stack is gone?

No you can simply turn off the Compute Group via ASG to 0 and ensure there are no running instances and you will not be billed for Datomic. As you said, you will still need to pay AWS for any resources you have remaining (i.e. S3, DDB Tables etc), but there is no charge for Datomic if the compute instances are down and storage resources remain.

This section of our docs might be of special interest to you:

Reducing AWS Costs

There are a number of things you can do to reduce the AWS costs for Datomic Cloud:

1 Like

Awesome! Thanks @jaret!