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?

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠