I have an EMR cluster running on AWS and the target group of my NLB points to the IP of the master node of the EMR cluster, when this cluster terminates and is created again I want the target group to point to the new IP of the cluster using a lambda function.
How should I go about it? I will use AWS eventbridge to trigger lambda function every five minutes, thanks in advance for your help!