def emr()

in app.py [0:0]


def emr(config, input_buckets: [str]):

    environment_variables = [
        "CLUSTER_NAME",
        "MASTER_INSTANCE_TYPE",
        "CORE_INSTANCE_TYPE",
        "CORE_INSTANCE_COUNT",
        "CORE_INSTANCE_MARKET",
        "TASK_INSTANCE_TYPE",
        "TASK_INSTANCE_COUNT",
        "TASK_INSTANCE_MARKET",
        "RELEASE_LABEL",
        "APPLICATIONS",
        "CONFIGURATION",
    ]

    list_vars = ["APPLICATIONS"]

    int_vars = [
        "CORE_INSTANCE_COUNT",
        "TASK_INSTANCE_COUNT",
    ]

    json_vars = ["CONFIGURATION"]

    clean_config = {"INPUT_BUCKETS": input_buckets}

    for v in environment_variables:
        val = config[v]
        clean_config[v] = val

    return EMRClusterDefinition(
        app, id=config["CLUSTER_NAME"] + "-stack", config=clean_config
    )