Mapping webpagetest_master to a fixed set of agents

I feel that this is a very silly question, but I wasn’t able to find an answer so far. :frowning:

I need to have a static webpagetest agent - i.e. I do not want webpagetest to terminate and recreate agent instances, because it takes ages, plus we have tagging requirements in our organisations that are painful to implement when instances are being recreated automatically.

Is there a way to tell webpagetest “here’s your test agent, use it”? What I did is I allowed webpagetest master to create an agent, then I removed ec2 access key from settings. All was fine until I restarted the instances. Now webpagetest master does not see an existing agent.

I remember finding config file that listed existing agents, but I cannot find it now.

Found a solution myself - needed to attach an Elastic IP to a webpagetest_master, and then change userdata on the agent to point to it. Looks like they are connected by external IPs by default instead of private IPs, and external IPs change on restart unless an Elastic IP is used.