小编alt*_*rse的帖子

Airflow/Amazon EMR:VPC/子网配置无效:需要子网:指定的实例类型 m5.xlarge 只能在 VPC 中使用

我想创建一个通过 Amazon EMR 上的 Airflow 触发的 emr 集群。emr 集群显示在 Amazon EMR 的 UI 中,但显示错误: “VPC/子网配置无效:需要子网:指定的实例类型 m5.xlarge 只能在 VPC 中使用”

json以下是Airflow 脚本中使用的此任务的代码片段和配置详细信息格式。

我的问题是如何将有关 VPC 和子网的信息(id 代码)合并到 json 中(如果可能的话)?那里没有明确的例子。

提示:网络和 EC2 子网已创建

JOB_FLOW_OVERRIDES = {
    "Name": "sentiment_analysis",
    "ReleaseLabel": "emr-5.33.0",
    "Applications": [{"Name": "Hadoop"}, {"Name": "Spark"}], # We want our EMR cluster to have HDFS and Spark
    "Configurations": [
        {
            "Classification": "spark-env",
            "Configurations": [
                {
                    "Classification": "export",
                    "Properties": {"PYSPARK_PYTHON": "/usr/bin/python3"}, # by default EMR uses py2, change it to py3
                }
            ],
        } …
Run Code Online (Sandbox Code Playgroud)

python amazon-web-services amazon-emr apache-spark airflow

3
推荐指数
1
解决办法
2023
查看次数