Search code examples
user-interfacewebserverip-addressairflowamazon-lightsail

View UI interface generated by Apache Airflow webserver running on virtual machine


I know that when you run airflow webserver via your home terminal, you can view the UI interface by going to http://localhost:8080. I am able to do this.

However, I have a virtual Amazon Lightsail instance which I ssh into. I then jump into a virtual environment from there to run the airflow webserver command. This executes successfully, however I cannot thereafter access the UI interface. I've tried entering the following addresses into my browser:

  1. [ip address]:8080
  2. [ip address]
  3. [ip address]:80

And a multitude of others. Any idea how I go about accessing the UI interface?


Solution

  • On an instance in AWS by default all external ports are closed and only port 22 is open (used for ssh), also there may be option to easily click Allow Http and Https which would open port 80 and 443 but since airflow webserver runs on port 8080 by default you would have to go in network setting of your instance and open port on which your airflow webserver is running.

    This is actually really easy:

    Go to the "Network & Security" -> Security Group settings in the left hand navigation

    • Find the Security Group that your instance is apart of
    • Click on Inbound Rules
    • You have to choose "Custom TCP rule" in the dropdown.
    • Type the port (8080) in "port range"
    • Click Apply(add rule) and enjoy

    enter image description here

    you can specify the port you opened while running the airflow command.

    airflow webserver -p 8080