Dashboard access from AWS ECS - Ports

I have deployed Parse Server and Dashboard into their own containers on Amazon AWS ECS. They are on the same EC2 instance. They are published on ports 1337 & 4040 respectively.

To access from my browser, I need to add in a security group rule for BOTH these ports from my IP (I don’t want to allow 0.0.0.0/0…).

Why do I need the 1337 port to be open to use Dashboard in my browser? I thought connectivity between the 2 would occur inside the VPC of my ECS host / instance which wouldn’t need any ports opening except the 4040 for the Dashboard itself.

The dashboard does not run in the ECS container. The dashboard is downloaded and executed locally, like a Parse App using the Parse JS SDK. You can test this by opening the dashboard in the browser, then suspending the dashboard ECS container and you can see that the dashboard still works normally - as long as you don’t try to reload it. Therefore it requires the port of Parse Server to be accessible from the machine that runs your browser.

Thanks for the explanation, makes it very clear.