According to the documentation, Alexa skills run in the cloud and therefore need a cloud-accessible server. So if I wanted to have Alexa communicate with something on my local network, I would need to make that something accessible from the cloud.
However, this does not always appear to be the case. The MyMedia skill, for example, has a local server that you install and which is NOT cloud accessible. I installed it on my local network and registered it with my amazon account, and it worked without me having to open/forward any ports on my router. Further, it claims to be able to stream music directly from my computer to my Alexa, again without going through the cloud to do so. How might this be possible? How do you get Alexa to communicate with a server on the local network without opening/forwarding any ports through my router?