- Newest
- Most votes
- Most comments
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
