You don't need a notebook; you can ssh to the dev endpoint and run it with the gluepython
interpreter (not plain python
).
e.g.
radix@localhost:~$ DEV_ENDPOINT=glue@ec2-w-x-y-z.compute-1.amazonaws.com
radix@localhost:~$ scp myscript.py $DEV_ENDPOINT:/home/glue/myscript.py
radix@localhost:~$ ssh -i {private-key} $DEV_ENDPOINT
...
[glue@ip-w-x-y-z ~]$ gluepython myscript.py
You can also run the script directly without getting an interactive shell with ssh (of course, after uploading the script with scp
or whatever):
radix@localhost:~$ ssh -i {private-key} $DEV_ENDPOINT gluepython myscript.py
If this is a script that uses the Job
class (as the auto-generated Python scripts do), you may need to pass --JOB_NAME
and --TempDir
parameters.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…