Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(@aws-cdk/aws-events-triggers): introducing sqs target support in event rule #2683

Merged
merged 10 commits into from
Jun 4, 2019
Prev Previous commit
Next Next commit
feat(@aws-cdk/aws-events-triggers): introducing sqs target support in…
… event rule
  • Loading branch information
made2591 committed May 30, 2019
commit f2b4b0d1abb1c73ad1ffa2a2edeecfa5e77dbb79
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import cdk = require('@aws-cdk/cdk');
import targets = require('../../lib');

// ---------------------------------
// Define a rule that triggers an SNS topic every 1min.
// Connect the topic with a queue. This means that the queue should have
// Define a rule that triggers an event every 1min.
// Connect the event with a queue. This means that the queue should have
// a message sent to it every minute.

const app = new cdk.App();
Expand All @@ -34,6 +34,6 @@ policy.addCondition("ArnEquals", {
});
policy.addPrincipal(new iam.ServicePrincipal("events"));
queue.addToResourcePolicy(policy);
event.addTarget(new targets.SqsQueue(queue));
event.addTarget(new targets.SqsQueue(queue);

app.run();