Hi guys I'm trying to create a cloudwatch rule tha...
# aws
b
Hi guys I'm trying to create a cloudwatch rule that publishes a message on SQS every 2 hours. That's where I'm stuck:
Copy code
const queue = new aws.sqs.Queue('myQueueName', { visibilityTimeoutSeconds: 180 });

const eventRule = new aws.cloudwatch.EventRule('myRule', {
  scheduleExpression: 'cron(0 0 0/2 1/1 * ? *)',
});

new aws.cloudwatch.EventTarget('myEvent' {
  rule: eventRule.name,
  // ...
});
what do I have to pass as arguments to the
aws.cloudwatch.EventTarget
constructor to link the queue created above and the event? Also, how do I specify the SQS message format? Thank you!!