we would like to run a time consuming C++ build on an AWS EC2 Windows Server Instance with 16 vCPUs. Due to the high cost we would like this instance to - start - run the build - when build is complete (or stops due to an error), stop instance
I considered using alarms for that purpose, but the build process has parts where the CPU is not used much (e.g. uploading files where network is used but almost no CPU) and alarms can not handle checking for both CPU and network traffic (AND operator is missing).
Are there any other mechanisms I can use for idle detection? To some extend we can change our build scripts to send messages (e.g. network messages) to AWS.