Question:
Is it possible to get the public-ip of an amazon sagemaker
notebook instance?
I was wondering if I can ssh into it using the public ip for remote debugging purposes.
I tried getting the public ip using the below curl command
1 2 |
$curl http://169.254.169.254/latest/meta-data |
This just lists the local ip and not the public ip.
I also tried the below command.
1 2 |
$curl ifconfig.me |
This returns an ip address like 13.232.96.15
. If I try ssh into this it doesnt work.
Is there any other way we can do this?
Note : The ssh port 22 is open already in the security group
Answer:
I don’t think you can ssh to notebook instances. You can either use open them from the console, or grab the url with an API, re: https://docs.aws.amazon.com/sagemaker/latest/dg/howitworks-access-ws.html
If you need a terminal, then you can open one from Jupyter.