Skip to content

Creating a sagamaker PipelineSchedule on a specific schedule group

0

I can create a PipelineSchedule to run a sagemaker pipeline using https://sagemaker.readthedocs.io/en/stable/workflows/pipelines/sagemaker.workflow.pipelines.html#pipeline-schedule - i..e

schedule = PipelineSchedule(
    name="sagemaker-test-schedule",
    rate=("15", "minutes")
)

But this uses the default schedule group under Amazon EventBridge > Schedule

I've been asked to use the schedule group data-science created for this purpose, but the PipelineSchedule api above doesn't seem to have a schedule group parameter. Is there some other way of doing this - i.e. perhaps setting the default schedule group on the role I'm using?

2 Answers
0

Hi,

Did you try to create your schedule with the regular CLI command to associate a schedule to a group rather than via SageMaker ?

See https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-schedule-group-create.html

aws scheduler create-schedule --name <your-schedule>  --schedule-expression 'rate(5 minutes)' \
--target '{"RoleArn": "ROLE_ARN", "Arn": "QUEUE_ARN", "Input": "TEST_PAYLOAD" }' \
--group-name <your-group>
--flexible-time-window '{ "Mode": "OFF"}'

Best,

Didier

EXPERT
answered 2 years ago
0

Yeah I can do that, or from the console. I was just wondering if I could do the same via the sagemaker api. Also I'd like to attach a schedule to an existing pipeline and was wondering if this is possible via the api or only from cli/console.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.