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
demandé il y a 9 mois210 vues
1 réponse
1
Réponse acceptée

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
EXPERT
répondu il y a 9 mois
  • thank you, i used Account with Administrator Access, I missed for SQS access policy. I tried to reconfigure and it's working for now.

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions