I have asked this question before although the answer is no longer sufficient nor current. I would like to repost this question; how can this be achieved using Amazon's tools?
I don't know if there's a tool from Amazon to do this but I would think that you could attack the problem in two ways: A) find out what's causing the lockup and fix it
B) install watchdog software and have it reboot the system if a process is locked, assuming it is just a process and not the system becoming locked up
C) install/configure resource quotas to prevent user processes from bogging down the server resources.
If there were more information maybe others would have other suggestions, but from what you had posted I would think maybe these suggestions would be on the right track?