I answered my own question.
You do what you say in your tutorial and type
ifconfig when SSH’ed into your EC2. Then replace the
host piece of the command to run the postgraphile docker container with the ip address of your instance.
Finally, You need a
Custom TCP Rule on your EC2 instance that is available on port 5000 from anywhere.