invalid cron expression get passed in boto3.client("event").put_rule() function
See original GitHub issueFor example this invalid cron expression, cron(0/5, 9-18, ?, *, MON-FRI, *)
import boto3
client = boto3.client("events")
rule_name = "test"
cron_expression = "cron(0/5, 9-18, ?, *, MON-FRI, *)"
client.put_rule(
Name=rule_name,
ScheduleExpression=cron_expression,
State='ENABLED',
)
if you run the code, there’s no exception reported about invalid cron expression, is this a new feature or a bug? if this is not a bug, then there’s a bug in the aws console, if I put this cronexpression, I would not get any samples.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
EventBridge — Boto3 Docs 1.26.31 documentation - AWS
A low-level client representing Amazon EventBridge ... Region when an "unhealthy" state is encountered and events will be routed back to the primary...
Read more >python - Boto3 cron: Parameter ScheduleExpression is not valid
I am trying to schedule event just after 15 ...
Read more >PutRule - Amazon EventBridge - AWS Documentation
A single rule watches for events from a single event bus. Events generated by AWS services go to your account's default event bus....
Read more >Chalice - Open Source at AWS
MINUTES)) def rate_obj_handler(event): pass @app.schedule(Cron(15, 10, '? ... Create a lambda function and configure it to be invoked whenever an event that ...
Read more >Lambda Function Is Not Triggered Using Cron - ADocLib
Example of creating a function that runs as a cron job using the serverless schedule Receive an email, store in S3 bucket, trigger...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @HCharlie,
Just wanted to let you know that the events team has been working on this, but we don’t have a definitive fix as of yet. For the time being, I’m going to close this and open a new issue in our shared SDKs repository for tracking. Please let me know if you have any questions!
Hi @HCharlie,
Thanks for reporting! I just tested and confirmed that you can pass the expression in both the console and the SDKs. This would be an issue with the EventBridge PutRule API— I can see they do some shape and value validation, but it looks like it’s not refined enough to catch something like this. I’ll reach out to determine whether or not this is expected behavior.