Get Sagemaker Notebook Instance IP address in CloudFormation/CDK

Viewed 385

Is it possible to retrieve the private IP address assigned to a Sagemaker Notebook Instance in a CloudFormation template? In CDK? Or perhaps, Terraform?

From the AWS documentation: there's only 1 property being exposed, namely NotebookInstanceName. So I guess, it's not supported yet.

Is there any other means? Any thoughts?


1 Answers

Well a few options, I used my firewall, but you could also use the vpc flow log to do it.

Just curl an ip address you know would be unique and then look at the firewall or vpc flow log and then you will know the internal ip address, as thats the one accessing the ip address you were trying to access from inside the notebook.

I tried opening the terminal and doing an ifconfig but it was not available.

Related