Using xGT on AWS

The xGT server runs as a Linux daemon on an AWS instance you spin up and listens on a local port for commands. The server is driven by a python library, which can be run either locally on the AWS instance or any other python-capable client via the separate xgt package.

There are three general modes of operation for working with xGT on AWS:

1. Local to AWS

All python scripts are run locally within the same AWS instance.

This strategy involves:

2. SSH Tunneling

All python scripts are run on a remote system such as your laptop or desktop that is connected using an SSH Tunnel.

$ ssh -i <private key file> -N -L 4367:localhost:4367 ec2-user@<instance DNS name or IP address>

3. Using an open port

Warning: This method is insecure.

This is similar to the previous scenario but the EC2 instance has a port opened up for clients to connect. The default port for xgt is 4367, but an alternate port may be used.

$ python
>>> import xgt
>>> conn = xgt.Connection("<DNS name or IP address>", 4367)