After the EC2 instance has processed all messages in the queue, it should shutdown. However, there are times when I need to login manually to perform some maintenance and I do not want the EC2 instance to shutdown while I am logged in.
I have never gotten this to work reliably. Either the instance will shutdown whether or not I am logged in, or it will never automatically shutdown and I will need to manually reboot the instance to get it to start processing messages from the queue again.
If anybody knows of a reliable way to check if there are any interactive sessions, that would really help.
After the EC2 instance has processed all messages in the queue, it should
shutdown
. However, there are times when I need to login manually to perform some maintenance and I do not want the EC2 instance to shutdown while I am logged in.I have never gotten this to work reliably. Either the instance will shutdown whether or not I am logged in, or it will never automatically shutdown and I will need to manually reboot the instance to get it to start processing messages from the queue again.
If anybody knows of a reliable way to check if there are any interactive sessions, that would really help.
https://github.com/jekyll/Utterson/blob/d24ee3e8a678fc0bdd91d3b69dd4a330f5347be3/aws/ec2/boot#L13-L16