Why not just use the health check feature already on the ALB to check the host, which would redirect the traffic for you? To answer your question, yes you can use Cloudwatch event with Lambda as target to fulfill your request; I had worked on a scenario, where I used Cloudwatch event to trigger lambda functions - one lambda to deregister then stop EC2 and the other one to start another EC2/register in target group behind the ALB.
API Gateway does not support dynamic routing, even not based on CloudWatch. What you can do is invoke a Lambda function that performs the routing logic. Just note that it will require that the function will be running for the duration of the API, which will add you the cost.
Using CloudWatch for traffic monitoring on EBSasked 2 months ago
Do you have a code example that uses the Java SDK to publish statistic sets to Cloudwatch?asked 2 months ago
Can we monitor external (outside aws) devices in cloudwatch?asked 22 days ago
Will Route 53-with-Failover Based on CloudWatch Work With A Private API-Gateway REST-API?asked 8 months ago
Cloudwatch alerts - find keywords and alert - but notify based on server (stream) nameasked 3 months ago
Routing based on Cloudwatch metrics/alarmsasked a month ago
Can I use CloudWatch Logs to trigger a Lambda function?Accepted Answerasked 2 years ago
How do a trigger a reboot action on lightsail cloudwatch alarm state?Accepted Answerasked 3 months ago
API Gateway Dynamic routingAccepted Answerasked 2 years ago
ALB Routing to Unhealthy TargetsAccepted Answerasked 3 years ago