Ro'ee Orland
Ro'ee Orland

Reputation: 11

Accessing Luigi visualizer on AWS

I’ve been using the Luigi visualizer for pipelining my python code. Now I’ve started using an aws instance, and want to access the visualizer from my own machine. Any ideas on how I could do that?

Upvotes: 1

Views: 308

Answers (2)

Kirk Broadhurst
Kirk Broadhurst

Reputation: 28728

Good question and I'm amazed I can't find a duplicate on StackOverflow. You broadly need to do two things:

  • Ensure the luigi webserver is hosting content correct. You can probably do this via site.conf, or you can probably do it via luigi's default-scheduler-host property. This corresponds to @PierluigiPuce second point.
  • Correctly expose and secure your EC2 instance. This is a VPC exercise (see docs) and is an entire area to learn, but in short you need to configure your VPC so that the valid requests are routed to the instance on the correct port, and invalid requests are blocked. This corresponds to @PierluigiPuce first point.

Your primary consideration is whether it is okay for this to be public facing. Probably not. Then you can secure the instance via IP address ranges, via a VPN, or even via SSH port forwarding through a jump host.

Having it completely open is the easiest and worst solution. Putting the instance in a public subnet, and restricting access based on IP address, is probably the second easiest solution, and might be a reasonable compromise for you.

Upvotes: 0

PierPuce
PierPuce

Reputation: 181

We had the very same problem today on GCP, and solved with the following steps:

  1. setting firewall rules for incoming TCP connections on port used by the service (which by default is 8082);
  2. installing apache2 server on the instance with a site.conf configuration that resolve incoming requests on ip-of-instance:8082.

That's it. Hope this can help.

Upvotes: 1

Related Questions