Python EventBridge Scheduler .create_schedule() RegEx Validation Failing #4372
Labels
bug
This issue is a confirmed bug.
scheduler
service-api
This issue is caused by the service API, not the SDK implementation.
Describe the bug
I'm trying to use a dead letter queue when creating a new Schedule however it is failing with the following error:
An error occurred (ValidationException) when calling the CreateSchedule operation: 1 validation error detected: Value 'arn:aws:sqs:ap-southeast-2:123456789123:retry-dlq.fifo' at 'target.deadLetterConfig.arn' failed to satisfy constraint: Member must satisfy regular expression pattern: arn:aws[a-z-]*:sqs:[a-z0-9\-]+:\d{12}:[a-zA-Z0-9\-_]+
Also, the current regex wouldn't support fifo queues that must end with .fifo
Regression Issue
Expected Behavior
validation passes because it's a valid SQS Queue
Current Behavior
An error occurred (ValidationException) when calling the CreateSchedule operation: 1 validation error detected: Value 'arn:aws:sqs:ap-southeast-2:123456789123:fhs-px-mon-oncall-ack-retry-dlq.fifo' at 'target.deadLetterConfig.arn' failed to satisfy constraint: Member must satisfy regular expression pattern: arn:aws[a-z-]*:sqs:[a-z0-9\-]+:\d{12}:[a-zA-Z0-9\-_]+
Reproduction Steps
try to use the create_schedule() function with the Target parameter set to a valid SQS arn
Target={
Possible Solution
arn:aws[a-z-]*:sqs:[a-z0-9\\-]+:\d{12}:[a-zA-Z0-9\-_\.]+
This would also support .fifo queues
Additional Information/Context
No response
SDK version used
1.35.77
Environment details (OS name and version, etc.)
Linux 5.15.167.4-microsoft-standard-WSL2
The text was updated successfully, but these errors were encountered: