-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Cloudwatch SQS Event Target #1786
Cloudwatch SQS Event Target #1786
Comments
It's not built in to Queue right now, but you can write a new class that implements https://github.com/awslabs/aws-cdk/blob/master/packages/@aws-cdk/aws-sns/lib/topic-base.ts#L282 (Reference your queue instead). |
Unfortunately, |
Very important feature for us! We want to send messages to an SQS as soon as StepFunction execution is complete. Currently we have to have a custom Lambda inside SF to do that. |
I would like to work on this if it is ok for everyone: I'm currently into the topic for a personal project, and I think I can make some experiment on this |
That would be great but sync up with @rix0rrr since he plans a bit of a refactor in this area in the coming days. |
I think I drafted a solution, the Event Rule was generated correctly with the SQS Target. I didn't write the test yet... |
Sounds great! Feel free to create a draft PR for it, I will have a look. |
I'm thinking the model should be a mix between this: https://github.com/awslabs/aws-cdk/blob/master/packages/%40aws-cdk/aws-events-targets/lib/ecs-ec2-task.ts And this: https://github.com/awslabs/aws-cdk/blob/master/packages/%40aws-cdk/aws-events-targets/lib/sns.ts Specifically, I'm thinking the SQS target takes an
As well as fields that go into SqsParameters: https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_SqsParameters.html (Seems to be only messageGroupId) |
@rix0rrr thank you, it would really be appreciated! I just wrote the test using SNS as model. I'm building right now and I will run them ^^ For everyone reading about this issue, if your use case is around triggering events from S3 event creation directly to SQS you can use successfully Don't forget to provide to SQS the right policy to let S3 publish correctly: I'm working on a working sample here |
@rix0rrr I implemented the |
What I wanted to get from that example is: we have multiple props on If you've already got that, great! Also, it seems to me it's not possible to get |
Ok, regarding parameters I got your point from 10k feets, but I'm confused 🤔I had a look at https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/API_EcsParameters.html and some of them seem to be not present in https://github.com/awslabs/aws-cdk/blob/master/packages/%40aws-cdk/aws-events-targets/lib/ecs-ec2-task.ts - like the Then in the bind, I saw that the input takes from the props, together with
Regarding this, I still have to investigate. However, I packaged also the tests with just the message - by following almost the SNS topic and I run the tests and they seem to be fine. Do you think I can already make a pull request even if parameters are not present yet? |
Extend the Target for Event Rule to SQS Queues. This may be needed in situations where users want to create an Event Rule and have as a target an SQS Queue. Closes #1786.
Is it possible to have a SQS queue as an event target via a
EventRule
?The text was updated successfully, but these errors were encountered: