Kapacitor recovery alert when aws instance is gone


I have servers in aws with telegraf agent installed, which sends data to influx and also the alert via kapacitor to pagerduty.

The problem is that the alert goes to pagerduty, and when the instance dies, kapacitor never finds out that this server is no longer alive and therefore the alert no longer makes sense. Sumarizing: we end up having Pagerdutty alerts that are related to servers that are no longer active.
How can we make Kapacitor send the recovery notification to resolve the alert?

How do you usually solve this problem? Is it possible to solve througth kapacitor?

Thank you very much