I made a python script that would send data such as time since last user input, CPU usage, network I/O, etc to a websocket endpoint, which is written to a DB and then read off from it to decide if an instance needs to be stopped.
But my friends told me that using cloudwatch would be better and easier for this use case. From what I see, I can use any one metric (CPU utilization, network IO, etc) to make this decision on cloudwatch, but I doubt that would be enough to decide if an instance is actually idle. Can I really use cloudwatch alarms for my problem? If so can you provide some resources I can refer for this problem?
Thanks in advance!
P.S: I referred this post, but doesn’t seem to answer my question really.