2
votes

I want to connect to a database running in different cloud provider and it is exposed publicly.

I need to connect to that database from sagemaker notebook instance.

But the public ip of the sagemaker notebook instance needs to be whitelisted on the other side.

Is it possible to attach elastic ip to sagemaker notebook instance as I don't see any option to attach eip to sagemaker notebook instance?

2
@NeelamGehlot I don't think Amazon forums constitutes a dupe, but a citable answer, which I have created below. - rjurney

2 Answers

1
votes

No, it is not possible to assign a SageMaker notebook an Elastic IP, which is a disappointment. This missing feature makes the SageMaker product a lot more difficult to use with many sources of data, limiting its utility.

Official Amazon Answer

From the AWS SageMaker product forums on Dec 12, 2019: Possible to attach Elastic IP to sagemaker notebook instance?

Question> Is it possible to attach elastic ip to sagemaker notebook instance?

Answer> We are always re-evaluating our backlog of features based on customer requests,
so we appreciate the feedback on this feature.

You might want to start a new thread or chime in on that one if you want them to add this feature.

Possible Solutions

A general strategy for using a particular IP to access a resource would be to setup a proxy machine and authorize its IP and use it as a proxy to access your service. How hard this is depends on what you are doing - for S3 it doesn't seem possible - but for web-based requests this shouldn't be too hard. For AWS services you can use a proxy.

Personally I am trying to access Algoseek's requestor-pays S3 buckets directly from SageMaker notebooks and this isn't possible. I looked at setting up a proxy but can't figure out how. Instead I will copy the S3 data each time they add a day into our own S3 bucket.

0
votes

In my case, I have whitelisted the NAT Gateway's IP in the external database.