Open kylegibson opened 5 years ago
I think I've identified the cause.
A conflict occurs when both of these code paths are hit: you have a function name causes the rule name to be > 64 characters and there are multiple cron expressions.
https://github.com/Miserlou/Zappa/blob/master/zappa/core.py#L2420 does not take into consideration the index, or the name that was generated on line 2416
Any progress on this?
Edit: A workaround is to name your events.
{
"name": "my-scheduled-task",
"function": "path.to.lambda_handler",
"expression": "cron(0 * * * ? *)"
}
I've made some changes to make this work without external workarounds. It seems like the current behavior is a real bug — it breaks logical user expectations. I'll be shortly sending a PR with my proposed fix.
I'm attempting to schedule a function to run according to multiple cron expressions. Only a single CloudWatch Rule is created using the last cron expression.
zappa 0.47 settings.yaml
Looks correct so far, but not quite:
The CloudWatch Rules console confirms that there is only 1 rule for "awesome_event_function_is_really_long_so_it_needs_to_be_hashed"