0

I'm trying to use event bridge's new scheduler functionality:

example

I don't see the option "Call endpoint...", I did further reading and apparently is possible by sending a JSON but the format of that JSON is a big mystery and I can't find an example.

Is it possible to provide a working example of that, all that I tried is just not working.

EDIT: This is an AWS cli example for something else:

aws scheduler create-schedule --schedule-expression "at(2022-11-20T13:00:00)" --name schedule-name \
--target '{"RoleArn": "role-arn", "Arn": "QUEUE_ARN", "Input": "TEST_PAYLOAD" }' \
--schedule-expression-timezone "America/Los_Angeles"
--flexible-time-window '{ "Mode": "OFF"}'

The --target should be changed to call my API gateway endpoint but I can't figure out what are the required fields.

EDIT2: Was suggested that (this question) may provide a solution, but so far the accepted solution raises another question:

It appears you are right that the brand-new EventBridge Scheduler console interface does not yet (?) support API Destinations.

I would like to do it in schedulers not rules, the way I see it schedulers is more adequate to what I'm trying to do, and I already have a solution using rules

user952887
  • 405
  • 4
  • 9
  • Does this answer your question? [Scheduled EventBridge rule targeting API Destination](https://stackoverflow.com/questions/74479885/scheduled-eventbridge-rule-targeting-api-destination) – fedonev Dec 29 '22 at 14:52
  • No. I actually can create what I'm asking using event bridge rules. I would like to do the same using event bridge schedulers that were recently released. – user952887 Dec 29 '22 at 15:07
  • As of 1 month ago, when the answer was written and accepted, _the Scheduler console interface did not support API Destinations_. The fact that you cannot find the option in the console suggests this is still the case. The [CreateSchedule](https://docs.aws.amazon.com/scheduler/latest/APIReference/API_CreateSchedule.html) API does not appear to support API Destinations yet either. – fedonev Dec 29 '22 at 16:04
  • 1
    I think the best you can do until the Scheduler service is enhanced is to chain `Scheduler` -> `PutRule` -> `API Destination Target`. – fedonev Dec 29 '22 at 16:05

0 Answers0