1 Answer
- Newest
- Most votes
- Most comments
1
You should think of the rule with all its targets as a single entity. The idea is that the consumer of the event knows what events it is interested in.
Even if you have different targets that need the same rule, they should create two different rules. The exception is that if the two targets are part of the same sub system and are defined in the same template . In that case you can create a single rule with multiple targets.
So in your case I would create the rule with the SQS queue and the Lambda function in the same template.
Relevant content
- Accepted Answerasked 9 months ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 6 months ago
Okay that makes sense. I was putting it in the Entry Point because that lambda itself submits to the EventBridge rule... So I had assumed that means that the service itself should create it. It makes it way easier to keep EventBridge and SQS inside of the single Consumer lambda. Thank you for your assistance!