miaj
miaj

Reputation: 121

How to import git package into spark kernel in AWS Sagemaker notebook

I want to import and use this scala git package (https://github.com/seratch/AWScala) on AWS sagemarker notebook script to call AWS APIS. I tried cloning this package through the notebook terminal, but the import didn't work.

  1. I'm not sure how Jupyter notebook supports a scala package and how to add this dependency into the script.
  2. Is there other AWS SDKs for scala?

Upvotes: 0

Views: 135

Answers (1)

Mateusz Kubuszok
Mateusz Kubuszok

Reputation: 27535

If you use Almond as your Jupyter kernel, then it supports Ammonite way of importing things. So running:

import $ivy.`com.github.seratch::awscala:0.8.4`
// now you can import library's packages

should do the trick.

If you have some other Scala kernel, then similar thing should be mentioned in its documentation.

Scala runs on JVM so you can always use Java AWS SDK from Scala if this library isn't working for you.

Upvotes: 1

Related Questions