Alterting for dynamic instances

We host our service in EC2, the instances tend to go up and down, and they’re InstanceID is changing.
I had a variable to query CloudWatch for InstanceID’s.

I tried adding an alert for CPU Usages on the graph, but I can’t use it because it has a variable.

Is there way to achieve the same thing without a variable?