By using AWS re:Post, you agree to the AWS re:Post Terms of Use

I am triggering an EMR Serverless job using the AWS CLI command. How do I configure the Java version to Java 17?

0

I am unable to find any easy way of configuring Java 17 with EMR serverless via API or CLI commands. Most of the answers are old. Have there been any updates recently on this?

asked 5 months ago307 views
1 Answer
2
Accepted Answer

Hello,

The easiest way would be using "--runtime-configuration" in Create Application to pass the spark-default as mentioned in the link to add the below properties for the whole application.

{ 
            "classification": "spark-defaults",
            "properties": { 
               "spark.emr-serverless.driverEnv.JAVA_HOME" : "/usr/lib/jvm/java-17-amazon-corretto.x86_64/",
               "spark.executorEnv.JAVA_HOME": "/usr/lib/jvm/java-17-amazon-corretto.x86_64/" 
            }
}

Unfortunately, there is no simple option like the UI as the GUI translates the same configuration on client end when the dropdown is selected for different Java version on UI.

AWS
answered 5 months ago
profile pictureAWS
SUPPORT ENGINEER
reviewed 5 months 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.

Guidelines for Answering Questions