![](/img/trans.png)
[英]how to configure aws lambda to be able to access services on the emr master node?
[英]How to set env var to AWS EMR master node
我想將 env 值設置為主節點。 例如,我想export AWS_ENV="poc"
。 有什么方法可以使用configuration.json
而不是在bootstrapaction
使用一行代碼
我嘗試使用 yarn-env.export、spark-env.export 但它們都不能滿足我的要求
[
{
"Classification": "spark-env",
"Configurations": [
{
"Classification": "export",
"Properties": {
"AWS_ENV": "poc"
}
}
]
}
]
這是一個有效的 emr 配置示例。 請記住,這只會在主節點上設置環境變量,而不是在執行器上。
{"classification":"spark-env",
"properties":{},
"configurations":
[
{"classification":"export",
"properties":
{"PYSPARK_PYTHON":"/opt/spark/venv/bin/python",
"ENV_1":"val_1",
"ENV_2":"val_2"
},
"configurations":[]
}
]
}
]
我能看到的唯一區別是 category classification:export
缺少配置鍵。 試試下面的。
[
{
"Classification": "spark-env",
"Configurations":
[
{"Classification": "export",
"Properties":
{"AWS_ENV": "poc"
},
"Configurations:[]
}
]
}
]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.