- Newest
- Most votes
- Most comments
Job issues: If your job fails when you run a custom image, then check the complete logs in the configured logging destination. If logs aren't available, then check the following configurations:
- The base image for the custom image has the same type (Spark or Hive), Amazon EMR Serverless version, and architecture (x86_64/arm_64).
- The custom image didn't change Amazon EMR to include jars or binary files.
- The custom image environment variables, such as JAVA_HOME or SPARK_HOME, aren't changed.
I would request you to validate the image compatibility. Ensure that the base image you're using (public.ecr.aws/emr-serverless/spark/emr-7.8.0:20250425-x86_64) is compatible with your EMR Serverless application version. EMR Serverless provides an offline tool that can statically check your custom image to validate basic files, environment variables, and correct image configurations.
Image validation: Before using the custom image in your EMR Serverless application, it's recommended to validate it locally. You can use the Amazon EMR Serverless Image CLI tool to do this. However, if you're using a Windows machine, you'll need to run this validation in a Linux environment like Windows Subsystem for Linux (WSL). For more information kindly refer to the official documentation [+] https://docs.aws.amazon.com/emr/latest/EMR-Serverless-UserGuide/application-custom-image.html#validate
The following table lists the application versions available with EMR Serverless 7.8.0: Application Version Apache Spark 3.5.4 Apache Hive. 3.1.3 Apache Tez 0.10.2
If you want to switch to python 3.10. kindly use the below configuration before you submit the Spark job, set your properties to use the Python virtual environment, as follows.
--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
For a comprehensive investigation of this issue, please engage AWS Premium Support, so that we can access and analyze detailed system logs, metrics, and perform advanced diagnostics.
answered a year ago
Based on the information provided, there are a few potential issues that could be causing your EMR Serverless application to fail when using a custom image:
-
Image compatibility: Ensure that the base image you're using (public.ecr.aws/emr-serverless/spark/emr-7.8.0:20250425-x86_64) is compatible with your EMR Serverless application version. The image and application versions should match.
-
Image validation: Before using the custom image in your EMR Serverless application, it's recommended to validate it locally. You can use the Amazon EMR Serverless Image CLI tool to do this. However, if you're using a Windows machine, you'll need to run this validation in a Linux environment like Windows Subsystem for Linux (WSL).
-
ECR permissions: Make sure that your EMR Serverless application has the necessary permissions to access the ECR repository where your custom image is stored. You may need to update the repository policy to allow the EMR Serverless service principal to perform actions like DescribeImages, BatchGetImage, and GetDownloadUrlForLayer.
-
Image configuration: Verify that your custom image hasn't inadvertently changed critical environment variables like JAVA_HOME or SPARK_HOME, which could cause issues when running Spark jobs.
-
Region mismatch: Ensure that the ECR repository containing your custom image is in the same AWS region as your EMR Serverless application.
To troubleshoot further:
- Check the complete logs in your configured logging destination for any specific error messages.
- Verify that the base image for your custom image has the same type (Spark), EMR Serverless version, and architecture (x86_64) as your application.
- Make sure you haven't unintentionally modified any EMR-related files or binaries in your custom image.
Regarding your note about Python 3.9 deprecation, it's a good observation. While it's not directly related to your current issue, it's something the AWS team should be aware of for future planning.
If you continue to face issues after checking these points, you may need to reach out to AWS support for more detailed assistance, as there could be specific configuration or compatibility issues that require closer examination.
Sources
EMR Serverless Custom Image local validation failure | AWS re:Post
Resolve Amazon ECR permission or job issues in Amazon EMR | AWS re:Post
Using custom images with EMR Serverless - Amazon EMR
Troubleshooting AWS CodeBuild - AWS CodeBuild
EMR Serverless service principal is not authorized to perform: ECR:DescribeImages on resource | AWS re:Post
answered a year ago
Relevant content
asked 4 years ago
asked 4 years ago
asked 2 years ago
