-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(sns): create subscriptions in consumer scope (#3065)
Since in most cases the consumer needs to reference the topic to permit it to send them messages (e.g. invoke a lambda function or send messages to the queue), it makes much more send to create the SNS subscription resource on the consumer's scope/stack instead of the topic's. This change adds an optional scope field to TopicSubscriptionConfig which is respected by topic.addSubscription. If scope is not defined, the topic's scope will be used. We also changed subscriberId to be optional, since in the case where scope is specified, the natural ID for the subscription construct would be the topic's unique ID, which is now the default. A runtime error will be emitted if both scope and subscriberId are not provided. Fixes #3064
- Loading branch information
Elad Ben-Israel
authored
Jun 27, 2019
1 parent
71ad83d
commit 64a203f
Showing
19 changed files
with
580 additions
and
486 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.