Why didn't I receive any messages from SQS after creating a rule schedule and sending a target to SQS by AWS SDK?

0

You can take a look my sample code here

 const rule = await this.eventBridge
      .putRule({
        Name: payload.name,
        // EventBusName: 'eventbustest',
        ScheduleExpression: payload.expression,
        Description: payload.description,
        State: 'ENABLED',
      })
      .promise();
    const target = await this.eventBridge
      .putTargets({
        Rule: payload.name,
        Targets: [
          {
            Arn: payload.sqsTarget.arn,
            Id: payload.sqsTarget.id,
            Input: JSON.stringify({ test: 1 }),
          },
        ],
      })
      .promise();

I tried create rule using code then it's not working for SQS side but when I tried create on console then it's working

Ceck
質問済み 9ヶ月前210ビュー
1回答
1
承認された回答

Hi,

please make sure that the SQS access policy and IAM policy allow EventBridge to write messages to the queue. Additionally, check that the ARNs match your resources.

Here is more information: https://repost.aws/knowledge-center/sqs-queue-access-permissions

profile pictureAWS
エキスパート
回答済み 9ヶ月前
  • thank you, i used Account with Administrator Access, I missed for SQS access policy. I tried to reconfigure and it's working for now.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ