Skip to content

Why is EMR Serverless still using Python 3.9.x?

0

Python 3.9 will reach end of life on October 30, 2025. The latest version of EMR Serverless - 7.9.0 - still uses Python 3.9.22 in its reference image: https://gallery.ecr.aws/emr-serverless/spark/emr-7.9.0

When will the EMR Serverless team switch over to a newer, more supported version of Python 3?

1 Answer
0

According to the Amazon EMR release 7.0.0 information, EMR 7.0.0 includes Python 3.9 as part of its application upgrades. This is the current Python version that ships with EMR Serverless.

If you need to use a different Python version with EMR Serverless, you can build a custom image. For example, you can create a custom image based on the EMR Serverless base image and install Python 3.10 (or another version) on it. After building and deploying this custom image, you would need to set specific Spark properties to use the custom Python environment:

--conf spark.emr-serverless.driverEnv.PYSPARK_DRIVER_PYTHON=/usr/local/bin/python3.10
--conf spark.emr-serverless.driverEnv.PYSPARK_PYTHON=/usr/local/bin/python3.10
--conf spark.executorEnv.PYSPARK_PYTHON=/usr/local/bin/python3.10

There is no publicly available information about when the EMR Serverless team plans to upgrade to a newer Python version in their default images. However, using custom images provides a way to use newer Python versions with EMR Serverless without waiting for the default image to be updated.

It's worth noting that some organizations like AppsFlyer have evaluated the tradeoffs between using custom images versus JARs/Python files with EMR Serverless. While custom images offer greater customization (including the ability to use different Python versions), they come with considerations such as longer startup times (you pay for resources during image download) and potentially different CI/CD requirements.
Sources
Using custom images with EMR Serverless - Amazon EMR
Petabyte-scale data migration made simple: AppsFlyer’s best practice journey with Amazon EMR Serverless | AWS Big Data Blog
Amazon EMR release 7.0.0 - Amazon EMR

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.