Search code examples
amazon-web-servicesmachine-learningamazon-sagemakeramazon-neptune

ERROR:root:Unable to determine the Neptune ML IAM Role


When trying to run one of the Neptune-ML examples in a notebook instance when running the line

endpoints=neptune_ml.setup_pretrained_endpoints(s3_bucket_uri, setup_node_classification, setup_node_regression, setup_link_prediction, setup_edge_classification, setup_edge_regression)

it returns None, and I can see the following error in the logs:

ERROR:root:Unable to determine the Neptune ML IAM Role.

I guess this is related to roles and permissions but I cannot find anything in the documentation(I followed the official documentation when doing setup).

Question is: how to solve this issue or how to debug it?


Solution

  • This is likely because the notebook instance doesn't have the NeptuneML IAM role parameter set as an environment variable.

    Try running export NEPTUNE_ML_ROLE_ARN=<your neptune ml role arn> in the terminal of the notebook instance you're using. Alternatively you can add that to the .bashrc file on the notebook instance.