You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering an issue with the boto3 library where I am unable to set the ScheduleExpression to at(some date) using the put_rule method for CloudWatch Events. Additionally, I am unable to delete the rule after it has been triggered because the library does not accept the atScheduleExpression.
Please let me know if there is a workaround for this issue or if there are any plans to support the at(some date)ScheduleExpression in the future.
Thank you!
Regression Issue
Select this option if this issue appears to be a regression.
Expected Behavior
The put_rule method should accept the at(some date)ScheduleExpression and create the rule successfully.
Current Behavior
The put_rule method throws a ValidationException indicating that the ScheduleExpression is not valid.
Reproduction Steps
Attempt to create a CloudWatch Events rule with a ScheduleExpression set to at(some date) using the put_rule method.
Observe that the ScheduleExpression is not accepted and results in a ValidationException.
Code Example:
importboto3fromdatetimeimportdatetime, timedelta, timezone# Initialize boto3 client, it may need credentials or somethingevents_client=boto3.client('events')
# Calculate the event launch time (1 hour from now) => the event should be sent to a lambda function (yay!) expected_time=datetime.now(timezone.utc) +timedelta(hours=1)
schedule_expression=f"at({expected_time.isoformat()})"# Attempt to create the ruletry:
response=events_client.put_rule(
Name='awesome-event-instance-rule',
ScheduleExpression=schedule_expression,
State='ENABLED',
Description='Do something awesome at a specific time'
)
print("Rule created:", response)
exceptExceptionase:
print("Error creating rule:", str(e))
Possible Solution
IDK
Additional Information/Context
I also need to delete the rule after it has been triggered, but since the atScheduleExpression is not accepted, I am unable to achieve this.
SDK version used
boto3==1.36.10
Environment details (OS name and version, etc.)
Python 3.11.5 // macOS Sonoma 14.2.1
The text was updated successfully, but these errors were encountered:
Describe the bug
Hi,
I am encountering an issue with the boto3 library where I am unable to set the
ScheduleExpression
toat(some date)
using theput_rule
method for CloudWatch Events. Additionally, I am unable to delete the rule after it has been triggered because the library does not accept theat
ScheduleExpression
.Please let me know if there is a workaround for this issue or if there are any plans to support the
at(some date)
ScheduleExpression
in the future.Thank you!
Regression Issue
Expected Behavior
The
put_rule
method should accept theat(some date)
ScheduleExpression
and create the rule successfully.Current Behavior
The
put_rule
method throws aValidationException
indicating that theScheduleExpression
is not valid.Reproduction Steps
ScheduleExpression
set toat(some date)
using theput_rule
method.ScheduleExpression
is not accepted and results in aValidationException
.Code Example:
Possible Solution
IDK
Additional Information/Context
I also need to delete the rule after it has been triggered, but since the
at
ScheduleExpression
is not accepted, I am unable to achieve this.SDK version used
boto3==1.36.10
Environment details (OS name and version, etc.)
Python 3.11.5 // macOS Sonoma 14.2.1
The text was updated successfully, but these errors were encountered: