SNS notifications on stack events
See original GitHub issue❓ General Issue
I am playing around with different ways to hook into lifecycle events of Stacks / Components. Of course there is the AwsCustomResource or ProviderFramework way. While AwsCustomResource is only viable for a simple SDK calls, ProviderFramework offers a lot more but with more complexity involved.
Now i noticed notificationArns on Stack level. What i recall you can attach them via command line on deployment (not what i am looking for) or programatically via NestedStack Construct. I wonder why this requirement is in place? Why cant we add them on our main stacks? (i think you can only read them)
This way one could easily setup a topic and a consumer and one should be able to hook into those lifecycle events pretty easily.
proposed idea
Why not having a method like this on Stack construct:
let myStack = new MyStack(app,...);
myStack.addNotificationArns(...);
Not sure why this method is not available in the construct when at the end it will synth to AWS::CloudFormation::Stack
Issue Analytics
- State:
- Created 3 years ago
- Reactions:20
- Comments:13 (3 by maintainers)
Top GitHub Comments
AFAIK: Currently only possible through the cli:
cdk deploy stackID --notification-arns='arn:aws:sns:{region}:{aws-id}:{sns-name}'
(Replace the placeholders with your values)On subsequent calls the arn can be omitted.
Thats why it would make up a good feature Request. Think should be part of the AWS CDK.