eladkal commented on issue #54365:
URL: https://github.com/apache/airflow/issues/54365#issuecomment-3176842509

   You can just do
   
   The operator uses boto3 api
   `EMRContainers.Client.start_job_run`
   
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/emr-containers/client/start_job_run.html
   
   So according to the API you just need to set `configurationOverrides`. 
   ```
   emr_container_task = EmrContainerOperator(
       task_id="spark_job_with_custom_image",
       ...
       configuration_overrides={
           "applicationConfiguration": [
               {
                   "classification": "spark-defaults",
                   "properties": {
                       "spark.kubernetes.container.image": 
"123456789012.dkr.ecr.us-west-2.amazonaws.com/your-custom-spark-image:latest",
                       "spark.kubernetes.driver.container.image": 
"123456789012.dkr.ecr.us-west-2.amazonaws.com/your-custom-spark-image:latest",
                       "spark.kubernetes.executor.container.image": 
"123456789012.dkr.ecr.us-west-2.amazonaws.com/your-custom-spark-image:latest"
                   }
               }
           ]
       }
   )
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to