https://pulumi.com logo
Title
b

bitter-oil-45383

09/04/2020, 3:06 PM
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:
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!!