Environment variable to ProcessingJob in AWS Step function

0

I want to use pass variables to Sagemaker processsing job step in Step Functions.

This is the step function:

{
  "StartAt": "SageMaker CreateProcessingJob",
  "States": {
    "SageMaker CreateProcessingJob": {
      "Resource": "arn:aws:states:::sagemaker:createProcessingJob.sync",
      "Parameters": {
        "ProcessingResources": {
          "ClusterConfig": {
            "InstanceCount": 1,
            "InstanceType": "ml.m5.xlarge",
            "VolumeSizeInGB": 10
          }
        },
        "Environment": {
          "deviceENV": "retailWebplayer"
        },
        "AppSpecification": {
          "ImageUri": "<>.amazonaws.com/ecr-custom-image:latest",
          "ContainerEntrypoint": [
            "python3",
            "/opt/ml/processing/input/code/train-device-env.py"
          ]
        },
        "ProcessingInputs": [
          {
            "InputName": "code",
            "S3Input": {
              "S3Uri": "s3://<>/train-device-env.py",
              "LocalPath": "/opt/ml/processing/input/code",
              "S3DataType": "S3Prefix",
              "S3InputMode": "File",
              "S3DataDistributionType": "FullyReplicated",
              "S3CompressionType": "None"
            }
          }
        ],
        "StoppingCondition": {
          "MaxRuntimeInSeconds": 300
        },
        "RoleArn": "<>",
        "ProcessingJobName.$": "$$.Execution.Name"
      },
      "Type": "Task",
      "End": true
    }
  }
}

Is it better to use environment variables or parameters? Can we use parameters in this case and how?

Sem respostas

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas