Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python EventBridge Scheduler .create_schedule() RegEx Validation Failing #4372

Closed
1 task
fmg-kevin-kilroy opened this issue Dec 10, 2024 · 1 comment
Closed
1 task
Assignees
Labels
bug This issue is a confirmed bug. scheduler service-api This issue is caused by the service API, not the SDK implementation.

Comments

@fmg-kevin-kilroy
Copy link

fmg-kevin-kilroy commented Dec 10, 2024

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

  • Select this option if this issue appears to be a regression.

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={

            'DeadLetterConfig': {
                 'Arn': 'arn:.....'
            }, 

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

@fmg-kevin-kilroy fmg-kevin-kilroy added bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels Dec 10, 2024
@tim-finnigan tim-finnigan self-assigned this Dec 11, 2024
@tim-finnigan
Copy link
Contributor

Thanks for reaching out. The User Guide for EventBridge Scheduler notes:

EventBridge Scheduler does not support using a FIFO queue as your schedule's DLQ.

Also the Boto3 create_schedule command makes a request to the underlying CreateSchedule API, and the ValidationError is being return directly from that API. For DeadLetterConfig specifically, the regex is referenced here: https://docs.aws.amazon.com/scheduler/latest/APIReference/API_DeadLetterConfig.html. For bugs involving the service API we could reach out to the service team for review, but in this case based on the documentation this appears to be the expected behavior. If we're missing anything please let us know.

@tim-finnigan tim-finnigan closed this as not planned Won't fix, can't repro, duplicate, stale Dec 11, 2024
@tim-finnigan tim-finnigan added scheduler service-api This issue is caused by the service API, not the SDK implementation. investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a confirmed bug. scheduler service-api This issue is caused by the service API, not the SDK implementation.
Projects
None yet
Development

No branches or pull requests

2 participants