How to set a custom environment variable in EMR to be available for a spark Application : <p>I need to set a custom environment variable in EMR to be available when running a spark application. </p>

<p>I have tried adding this: </p>

<pre><code>                   ...
                   --configurations '[                                    
                                      {
                                      "Classification": "spark-env",
                                      "Configurations": [
                                        {
                                        "Classification": "export",
                                        "Configurations": [],
                                        "Properties": { "SOME-ENV-VAR": "qa1" }
                                        }
                                      ],
                                      "Properties": {}
                                      }
                                      ]'
                   ...
</code></pre>

<p>and also tried to replace "spark-env with <code>hadoop-env</code>
but nothing seems to work.</p>

<p>There is <a href="https://forums.aws.amazon.com/thread.jspa?threadID=223617" rel="noreferrer">this</a> answer from the aws forums. but I can't figure out how to apply it.
I'm running on EMR 5.3.1 and launch it with a preconfigured step from the cli: <code>aws emr create-cluster...</code></p>
