Search code examples
amazon-web-servicesaws-cloudformationscheduleraws-event-bridge

Retry Policy for Eventbridge Scheduler in CloudFormation


I am trying to implement Retry Policy into CloudFormation for Event Bridge Scheduler. According to documentation, it seems possible, however, when I try to deploy it that way, I get an error

Properties validation failed for resource Scheduler with message: #: extraneous key [RetryPolicy] is not permitted

I have tried to put the Retry Policy block directly into Properties:

  SchedulerSchedule:
    Type: AWS::Scheduler::Schedule
    Properties:
      RetryPolicy:
         MaximumEventAgeInSeconds: 3600
         MaximumRetryAttempts: 3
     ...

Any ideas?


Solution

  • The RetryPolicy needs to be part of a Target, not a top level property of the Schedule itself.

    MyFirstSchedule:
      Type: AWS::Scheduler::Schedule
      Properties:
        ...
        Target:
          ...
          RetryPolicy:
            MaximumEventAgeInSeconds: 3600
            MaximumRetryAttempts: 3