Hello, I'm sorry you're having trouble getting Canvas to work on EC2. Canvas views run on the local machine where the code is executing, e.g. on your EC2 machine. This is a security precaution. In order to access them remotely from your computer, you need to open an "ssh tunnel" to the EC2 machine so that you can access Canvas in your browser.
You can find the port Canvas is running this Python code on the EC2 machine:
Then, on your computer (not on the EC2 machine) start an SSH tunnel with the following command:
ssh -L <port>:localhost:<port> <your EC2 IP/hostname>
Now, you should be able to browse to the port on your computer in the browser: