Skip to content

Instantly share code, notes, and snippets.

@toddlers
Created January 14, 2021 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toddlers/123db099252c07b7028adf538f41be95 to your computer and use it in GitHub Desktop.
Save toddlers/123db099252c07b7028adf538f41be95 to your computer and use it in GitHub Desktop.
new state machine with execution name only
{
"Comment": "Defines the statemachine.",
"StartAt": "SageMaker CreateTransformJob",
"States": {
"SageMaker CreateTransformJob": {
"Type": "Task",
"Resource": "arn:aws:states:::sagemaker:createTransformJob.sync",
"Parameters": {
"BatchStrategy": "SingleRecord",
"DataProcessing": {
"InputFilter": "$",
"JoinSource": "Input",
"OutputFilter": "xxx"
},
"Environment": {
"SAGEMAKER_MODEL_SERVER_TIMEOUT": "300"
},
"MaxConcurrentTransforms": 100,
"MaxPayloadInMB": 1,
"ModelName": "${model_name}",
"TransformInput": {
"DataSource": {
"S3DataSource": {
"S3DataType": "S3Prefix",
"S3Uri": "${s3_input_path}"
}
},
"ContentType": "application/jsonlines",
"CompressionType": "Gzip",
"SplitType": "Line"
},
"TransformJobName.$": "$$.Execution.Name",
"TransformOutput": {
"S3OutputPath": "${s3_output_path}",
"Accept": "application/jsonlines",
"AssembleWith": "Line"
},
"TransformResources": {
"InstanceType": "xxx",
"InstanceCount": 1
}
},
"End": true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment