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
posta 9 mesi fa210 visualizzazioni
1 Risposta
1
Risposta accettata

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
ESPERTO
con risposta 9 mesi fa
  • thank you, i used Account with Administrator Access, I missed for SQS access policy. I tried to reconfigure and it's working for now.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande