Waiting for SageMaker CreateTrainingJob to Finish

0

I'm invoking the following task in my step function workflow:

https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-stepfunctions-tasks.SageMakerCreateTrainingJob.html

SageMakerCreateTrainingJob starts the task in an asynchronous manner, i.e. the task returns immediately after I request it to start, even if the training job may take hours to finish.

I want to have another task execute after the training job truly and completely finishes. What is an easy way to accomplish this without having to use the two techniques below?

I know there are two clunky ways to do this:

  • Using a combination of a Lambda function that calls the SageMaker API to poll for the status of a training job - i.e. to detect when it is finished - and a wait state to force a poll every X number of minutes or so.
  • Another possibility is using step function activities, but that would probably preclude me from using Lambdas as a Lambda activity worker would need to keep waiting (doing a thread wait) and constantly polling. I would also need to worry about the 15 minute Lambda time limit.
질문됨 3년 전766회 조회
1개 답변
0

Oops, I guess I didn't look at the integrationPattern property. Anyway, I set it to RUN_JOB and now the call is synchronous.

답변함 3년 전

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

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

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

관련 콘텐츠