EMR Serverless Custom Authenticator for spark magic kernel.
Project description
EMR Serverless Custom Sparkmagic Authenticator.
This package provides a custom implementation Jupyter Incubator Spark magic Kernel Custom Authenticator interface to enable integration from EMR-Serverless Application. The Custom Authenticator subclasses shipped in this package computes the AWS Signature Version 4 and appends HTTP Authentication headers to the request to the public livy endpoint exposed by EMR Serverless Application.
Pre-requisite
This package assumes that spark magic package is either already installed or will be installed by the consumer on the python environment to be used.
Steps to Install
pip install emr-serverless-customauth
This will install the package along with its dependencies.
Configuring Custom Authenticator with Sparkmagic
Please refer to the steps mentioned here on the spark magic github repository.
- Add a new custom auth to
authenticators
map present in sparkmagicconfig.json
file.
{
....
"authenticators": {
"Kerberos": "sparkmagic.auth.kerberos.Kerberos",
"None": "sparkmagic.auth.customauth.Authenticator",
"Basic_Access": "sparkmagic.auth.basic.Basic",
"EMRServerlessAuth": "emr_serverless_customauth.customauthenticator.EMRServerlessCustomSigV4Signer"
},
....
}
- Update the corresponding python and/or scala kernels present in sparkmagic
config.json
file to use theEMRServerlessAuth
.
{
"kernel_python_credentials": {
"username": "",
"password": "",
"url": "https://<emr-serverless-app-id>.livy.emr-serverless-services.<aws-region>.amazonaws.com",
"auth": "EMRServerlessAuth"
},
"kernel_scala_credentials": {
"username": "",
"password": "",
"url": "https://<emr-serverless-app-id>.livy.emr-serverless-services.<aws-region>.amazonaws.com",
"auth": "EMRServerlessAuth"
}
.....
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for emr_serverless_customauth-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc5d95a934da0fb6c53e6e5f5ab0f75d6c7d40357357d251510f77b6d50e9bf5 |
|
MD5 | 20aebf4536867df49936b367a5ab91d2 |
|
BLAKE2b-256 | 279e2de76e506cbb0e9dbdf2833deb956eadd29f49dc267f14592561fb2c2024 |
Hashes for emr_serverless_customauth-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef17378ed55a4ea70d646b4ac29b15c8224775e1d66a8a19ededf08be6e3fb67 |
|
MD5 | b4d6eef9fa4bc17640e5c45fa2a227c0 |
|
BLAKE2b-256 | 6a379029552e1a26e20ceba4c9bb35fb0163a0c0797db707b28e81873f4a0c35 |