aws-cdk
aws-cdk copied to clipboard
aws-cdk-lib: NotificationARN must be passed by constructor to actually send notifications
Describe the issue
Spent quite a bit of time on this, thinking that i was doing something wrong. I thought that we could just push to the notificationARNs array, but turns out the cloudformation output isn't produced in the template. I had to pass the array from the constructor (as props) to make it work. I feel like this should be mentioned in the documentation, and i'm willing to submit a PR myself.
Links
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.NestedStack.html
can you explain more about your intention and provide your code snippet if possible?
I can't share the code here, but basically i was trying to send notifications to a specific arn (my queue0. My first approach , was to push on the notificationARNs array. I assumed this would work, since the array contained the desired ARN (verified through unit test). The thing is, the actual cloudformation output didn't contain the actual ARN (no ARNs at all actually, since that was the only one i was passing). When i passed the array as a prop from the constructor, i reached the desired output.