Skip to main content

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.

  1. Add a new custom auth to authenticators map present in sparkmagic config.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"
  },
  ....
}
  1. Update the corresponding python and/or scala kernels present in sparkmagic config.json file to use the EMRServerlessAuth.
{
  "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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

emr_serverless_customauth-1.0.0.tar.gz (12.6 kB view hashes)

Uploaded Source

Built Distribution

emr_serverless_customauth-1.0.0-py3-none-any.whl (13.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page