You can configure a VPC for your simulation job which enables out bound network access to your VPC from the simulation host.
Currently, we don’t allow inbound network traffic to the simulation host.
One solution for communicating with your ROS code in simulation using rosbridge is to run rosbridge in the simulation host as part of the simulation or robot applications and opening a reverse SSH tunnel from the simulation host to an EC2 host in your VPC.
You can run rosbridge modifying your package.xml and launch file.
1) Add a dependency on rosbridge_suite to your package.xml:
2) Add the following to your .launch file:
Lastly, you can modify your launch file to open a reverse tunnel to an EC2 host in your VPC. Once this is established you can communicate with rosbridge from your EC2 host. Note: you’ll need to include ssh as a dependency like we did for rosbridge_suite above.
A non-rosbridge option for connecting to the simulation from your dev system is a pub/sub mechanism like MQTT. The AWS IoT Bridge Example is a good example of this approach: https://github.com/aws-robotics/aws-iot-bridge-example/blob/master/README.md