I want to execute some code on the instance before it is terminated. I could set a lifecycle hook to a lambda, which in turn ssh's into the instance and executes said code. But I would really like it if it is was possible to sed the notification to the instance being terminated.
I read somewhere this is possible, but i can't figure out a way. Anyone knows?
Thanks a lot, guys!