Skip to main content

aws-glue-libs

This repository supports python libraries for local development of glue pyspark batch jobs. Glue streaming is supported in the separate repository aws-glue-streaming-libs.

Contents

This repository contains:

  • awsglue - the Python libary you can use to author AWS Glue ETL job. This library extends Apache Spark with additional data types and operations for ETL workflows. It's an interface for Glue ETL library in Python.
  • bin - this directory hosts several executables that allow you to run the Python library locally or open up a PySpark shell to run Glue Spark code interactively.

Python versions by Glue Version

Different Glue versions support different Python versions. The following table below is for your reference, which also includes the associated repository's branch for each glue version.

Glue Version Python 3 Version aws-glue-libs branch
2.0 3.7 glue-2.0
3.0 3.7 glue-3.0
4.0 3.10 glue-4.0
5.0 3.11 glue-5.0
5.1 3.11 glue-5.1
6.0 3.13 main

You may refer to AWS Glue's official release notes for more information

Setup guide

If you haven't already, please refer to the official AWS Glue Python local development documentation for the official setup documentation. The following is a summary of the AWS documentation:

The awsglue library provides only the Python interface to the Glue Spark runtime, you need the Glue ETL jar to run it locally. The jar is now available via the maven build system in a s3 backed maven repository. Here are the steps to set up your dev environment locally.

  1. install Apache Maven from the following location: https://aws-glue-etl-artifacts.s3.amazonaws.com/glue-common/apache-maven-3.6.0-bin.tar.gz
  2. use copy-dependencies target in Apache Maven to download the jar from S3 to your local dev environment.
  3. download and extract the Apache Spark distribution based on the Glue version you're using:
    • Glue version 2.0: https://aws-glue-etl-artifacts.s3.amazonaws.com/glue-2.0/spark-2.4.3-bin-hadoop2.8.tgz1
    • Glue version 3.0: https://aws-glue-etl-artifacts.s3.amazonaws.com/glue-3.0/spark-3.1.1-amzn-0-bin-3.2.1-amzn-3.tgz
    • Glue version 4.0: https://aws-glue-etl-artifacts.s3.amazonaws.com/glue-4.0/spark-3.3.0-amzn-1-bin-3.3.3-amzn-0.tgz
    • Glue version 5.0: download the Apache Spark 3.5.4 distribution from https://spark.apache.org
    • Glue version 5.1: download the Apache Spark 3.5.6 distribution from https://spark.apache.org
    • Glue version 6.0: download the Apache Spark 4.1.1 distribution from https://spark.apache.org
  4. export the SPARK_HOME environmental variable to the extracted location of the above Spark distribution. For example:
    Glue version 2.0: export SPARK_HOME=/home/$USER/spark-2.4.3-bin-hadoop2.8
    Glue version 3.0: export SPARK_HOME=/home/$USER/spark-3.1.1-amzn-0-bin-3.2.1-amzn-3
    Glue version 4.0: export SPARK_HOME=/home/$USER/spark-3.3.0-amzn-1-bin-3.3.3-amzn-0
    Glue version 5.0: export SPARK_HOME=/home/$USER/spark-3.5.4-bin-hadoop3
    Glue version 5.1: export SPARK_HOME=/home/$USER/spark-3.5.6-bin-hadoop3
    Glue version 6.0: export SPARK_HOME=/home/$USER/spark-4.1.1-bin-hadoop3
    
  5. now you can run the executables in the bin directory to start a Glue Shell or submit a Glue Spark application.
    Glue shell: ./bin/gluepyspark
    Glue submit: ./bin/gluesparksubmit
    pytest: ./bin/gluepytest
    

(The gluepytest script assumes that the pytest module is installed and available in the PATH env variable)

Licensing

The libraries in this repository licensed under the Amazon Software License (the "License"). They may not be used except in compliance with the License, a copy of which is included here in the LICENSE file.


Release Notes

August 18 2026

The main branch now represents Glue 6.0, which runs Apache Spark 4.1 on Python 3.13. Glue 5.1 has moved to the glue-5.1 branch.

Breaking change: getResolvedOptions no longer accepts abbreviated argument names

getResolvedOptions parses the arguments your job was invoked with. Previously an abbreviated argument name was accepted as long as it was an unambiguous prefix of a declared option, so passing --additional-p would resolve to --additional-python-modules. As of Glue 6.0 abbreviations are rejected and raise GlueArgumentError.

Use the full option name in your job arguments:

args = getResolvedOptions(sys.argv, ['JOB_NAME', 'additional-python-modules'])

If you depend on abbreviated names, opt back in explicitly:

args = getResolvedOptions(sys.argv, ['JOB_NAME', 'additional-python-modules'], allow_abbrev=True)

July 26 2023

August 27 2021

  • The master branch has been modified from representing Glue 0.9 to Glue 3.0, we have also created a glue-0.9 branch to reflect the former state of the master branch with Glue 0.9. To rename your local clone of the older master branch and point to the glue-0.9 branch, you may use the following commands:
git branch -m master glue-0.9
git fetch origin
git branch -u origin/glue-0.9 glue-0.9
git remote set-head origin -a

Download files

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

Source Distribution

awsgluedataplanepython-6.0.0.tar.gz (97.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

awsgluedataplanepython-6.0.0-py3-none-any.whl (73.8 kB view details)

Uploaded Python 3

File details

Details for the file awsgluedataplanepython-6.0.0.tar.gz.

File metadata

  • Download URL: awsgluedataplanepython-6.0.0.tar.gz
  • Upload date:
  • Size: 97.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for awsgluedataplanepython-6.0.0.tar.gz
Algorithm Hash digest
SHA256 20c036692d59df1e9588f9c3a0d52144854560266aaa44efd23f272ce2486e2b
MD5 ce7efb5cf60d9ff705f5524cc0a3e19f
BLAKE2b-256 cd03b45f49eea672b2e683f0b4434b7fdcb96cba8b223ece99d0b9f0ffdf4ba7

See more details on using hashes here.

Provenance

The following attestation bundles were made for awsgluedataplanepython-6.0.0.tar.gz:

Publisher: publish.yml on awslabs/aws-glue-libs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file awsgluedataplanepython-6.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for awsgluedataplanepython-6.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f31f6b9905d7be564026ccb788224f1048e30574f962adf0f758832c07345ca
MD5 31d3e3f33d3753f806099b5ee71e2b09
BLAKE2b-256 dc0fac9ce300dee29466d21cf13919492c81444fec118713685f75604e0f8b14

See more details on using hashes here.

Provenance

The following attestation bundles were made for awsgluedataplanepython-6.0.0-py3-none-any.whl:

Publisher: publish.yml on awslabs/aws-glue-libs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

6.0.0 This release

2 files

5.1.0

2 files

5.0.0

2 files

0.0.2

1 file

0.0.1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page