- 最新
- 投票最多
- 评论最多
@Vimox Shah - I had the same issue as you did. I was able to fix it by understanding the logic of the deduplication in SQS FIFO. The message can contain either a "MessageDeduplicationId" OR you can let SQS calculate the MD5 to auto-generate a "MessageDeduplicationId ".
The issue is that the scheduler cannot send a "MessageDeduplicationId " , therefore, you MUST enable on the queue "ContentBasedDeduplication " = true
You can read here in "SqsParameters": https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/scheduler/client/create_schedule.html If you specify an Amazon SQS FIFO queue as a target, the queue must have content-based deduplication enabled.
Unfortunately, it seems the deduplication is done every 5 minutes, so you won't be able to get a 1 minutes scheduler.
What is your SQS access policy setting?
Also, I believe there are API events left in CloudTrail, are there any errors?
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-basic-examples-of-sqs-policies.html
I found that somehow Eventbridge scheduler is not working with FIFO SQS. If we change it to a standard queue then it is working perfectly fine.
相关内容
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 1 年前
Here is the SQS access policy. also there are no error or log related to this in cloudtrail { "Version": "2008-10-17", "Id": "eventbridgesqspolicy", "Statement": [ { "Sid": "First", "Effect": "Allow", "Principal": "", "Action": "SQS:", "Resource": "arn:aws:sqs:us-east-1:<accountid>:staging-billing-scheduler.fifo" }, { "Sid": "Second", "Effect": "Allow", "Principal": { "Service": "scheduler.amazonaws.com" }, "Action": "SQS:*", "Resource": "arn:aws:sqs:us-east-1:<accountid>:staging-billing-scheduler.fifo", "Condition": { "ArnLike": { "aws:SourceArn": "arn:aws:scheduler:us-east-1:<accountid>:schedule/default/staging-billing-scheduler" } } } ] }
From what I saw of the SQS access policy, the settings around the policy seemed fine. By the way, what kind of message is this EventBridge supposed to send to SQS every minute?
I have set the cron job for testing and debugging. actually, event bridge scheduler will generate one event in 24hrs. I am also confused that access policy is correct even IAM role for scheduler is also correct then why I am not receiving message in queue