Aws script to shutdown kafka

We would like to save money by shutdown Kafka on the weekend in aws. Does anyone has scripts to do that?

Hi @Erosney

welcome to the forum :slight_smile:

just to be sure:
are you running a self managed Kafka cluster on EC2 instances?


1 Like

No. They aren’t Managed clusters.

mmh not clear how your architecture/deployment looks like.
good you provide some details?


1 Like

If it’s EKS, you need some way to store and restore the data AFAIK, since you can only do so by destroying the cluster. Optionally you could switch to other instances for the weekend. But without knowing your setup, it’s hard to give proper advise.

The architecture/deployment it’s EKS

as @gklijs mentioned there is no optimal way to stop the cluster

one thing you could think about is to scale the kafka and zookeeper replicas to 0, though I’m not sure whether it has that big effect on costs

another thing might be to backup the cluster, stop/destroy the cluster on Friday and recreate the cluster and restore the data on Monday

there is a nice blog post how to implement it

never tested in a real world setup but sounds promising


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.