cdk/cdk/afc_lambdas/create_forecast.py [33:57]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def create_forecast_handler(event, context):
    """
    """

    payload = event["input"]["Payload"]
    prefix = payload["prefix"]

    AFC_FORECAST_NAME = payload["PredictorName"]

    update_status_json(payload, "IN_PROGRESS:create_forecast",
        payload["StatusJsonS3Path"])

    create_forecast_resp = afc.create_forecast(
        ForecastName=AFC_FORECAST_NAME,
        PredictorArn=payload["PredictorArn"]
    )

    resp = payload
    resp["ForecastArn"] = create_forecast_resp["ForecastArn"]
    resp["ForecastName"] = AFC_FORECAST_NAME

    update_status_json(resp, "DONE:create_forecast",
        payload["StatusJsonS3Path"])

    return resp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



cdk/cdk/afc_lambdas/index.py [181:205]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def create_forecast_handler(event, context):
    """
    """

    payload = event["input"]["Payload"]
    prefix = payload["prefix"]

    AFC_FORECAST_NAME = payload["PredictorName"]

    update_status_json(payload, "IN_PROGRESS:create_forecast",
        payload["StatusJsonS3Path"])

    create_forecast_resp = afc.create_forecast(
        ForecastName=AFC_FORECAST_NAME,
        PredictorArn=payload["PredictorArn"]
    )

    resp = payload
    resp["ForecastArn"] = create_forecast_resp["ForecastArn"]
    resp["ForecastName"] = AFC_FORECAST_NAME

    update_status_json(resp, "DONE:create_forecast",
        payload["StatusJsonS3Path"])

    return resp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



