https://github.com/aws/aws-node-termination-handler This will allow workloads to gracefully shutdown when an instance is shut down for any reason.