Cost Optimization
We aim to provide a secure, scalable, and cost-efficient solution to scan Amazon S3 or Cloudflare R2 for malware. Therefore, bucketAV supports running on spot instances, which reduces the compute costs by 50-90% compared to on-demand instances.
Reduce costs by running bucketAV on spot instances
What are spot instances? With spot instances, AWS provides a significant discount on spare virtual machines. When requesting a spot instance, you define the maximum price, and in case there is spare capacity in the data center, AWS will launch a spot instance. But, if AWS runs out of capacity for a specific instance type in one of their data centers, a spot instance might be interrupted anytime. In that case, AWS sends an interruption notice and terminates the instance 2 minutes later.
bucketAV deals with those spot interruptions. If a scan job gets interrupted, it will be reassigned to another EC2 instance. Also, bucketAV will try to replace the terminated instance.
How to enable spot?
Set the CapacityStrategy configuration parameter to SpotOnlyWithoutAlternativeInstanceType
or SpotOnly
. See configuration for details.
Spot with fallback to On-demand
We observed that the spot capacity decreased in many regions within the past few months. Therefore, it happened occasionally that bucketAV could not spin up spot instances. In that case, bucketAV cannot process the scan tasks waiting in the scan queue for a certain time. To avoid that problem but still use spot instances to reduce costs, we came up with the following solution: spot with fallback to on-demand. With this option, bucketAV automatically launches on-demand instances in case spot instances are unavailable.
Set the CapacityStrategy configuration parameter to SpotWithoutAlternativeInstanceTypeWithOnDemandFallback
or SpotWithOnDemandFallback
. See configuration for details.
Reduce costs by using savings plans
Alternatively, purchase savings plans to reduce the costs for EC2 instances launched by bucketAV. Utilizing savings plans works best for steady workloads or to reduce costs for the baseline capacity.