If you have own data center and more than one machine you do have a LAN.
I'm guessing you're talking about public cloud like AWS.
Similarly you can have private subnets (which is the best practice).
If you have a single instance that's only public, you can place definitions on local S3 and have instance pull it. You can secure everything so it's not accessible from outside, and you don't need service to be available from the outside.
If you have multiple instances and all are on public subnets and talk to each other over the Internet, you should rethink your design, but at very least have firewall configured. Security groups that list themselves could help.
Let me know if you have some other scenario.