Skip to content

Amazon.Scheduler.Model.ValidationException: 'batch is not a supported service for a target.' #3134

Answered by dscpinheiro
venukalam asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for taking a look.

What did you specify for the Amazon.Scheduler.Model.Target.Arn property? I checked and the console uses arn:aws:scheduler:::aws-sdk:batch:submitJob.

If I use this snippet the scheduler is created successfully:

var invokeBatchTarget = new Amazon.Scheduler.Model.Target
{
    Arn = "arn:aws:scheduler:::aws-sdk:batch:submitJob",
    RoleArn = "arn:aws:iam::123456789012:role/test-batch-scheduler-role",
    Input = JsonConvert.SerializeObject(scheduleJobInput)
};

// Existing code

var createScheduleResponse = await schedulerClient.CreateScheduleAsync(createScheduleRequest);
Console.WriteLine(createScheduleResponse.HttpStatusCode); // Outputs OK

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@venukalam
Comment options

@dscpinheiro
Comment options

Answer selected by venukalam
@venukalam
Comment options

@dscpinheiro
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants