Bitcoin private network on Amazon EC2

Bitcoin private network on Amazon EC2

I am looking to set up a private network of Bitcoin nodes over multiple machines (e.g, on multiple VMs on Amazon EC2) for experimentation. I want to be able to control how the different nodes are interconnected to each other in this network. Is there a way to do this on Bitcoind? The regtest mode that is commonly cited as a solution for this seems to have the ability to create multiple nodes on a single machine. Can it also be used to interconnect nodes across different machines according to a specified topology?