0

I'm trying to deploy an EventBridge rule in Terraform with the following cron expression:

schedule_expression = "cron (5 5 * * ? *)"

Trying to apply the plan however, throws

Error: error creating EventBridge Rule (dev-cron): 
ValidationException: Parameter ScheduleExpression is not valid.
status code: 400, request id: xxx

I have tried a cron generator, followed AWS docs on crons, and tried different cros, all throwing the same error. What am I missing here?

sneedster
  • 29
  • 5

1 Answers1

0

It is a small mistake, but you would want to remove the space between cron and the opening parenthesis.

schedule_expression = "cron(5 5 * * ? *)"

Unfortunately, AWS throws a generic error message, like Parameter ScheduleExpression is not valid, without giving a clue what the actual error is.

Ervin Szilagyi
  • 14,274
  • 2
  • 25
  • 40