Create a notification once CloudFormation StackSet is finished

0

*new to AWS

Hello.

I work for a vendor that uses a CF stack to deploy certain resources on our customers accounts. Our stack contains a custom resource that sends an SNS notification to our backend (SQS) once all other resources are deployed. We recently started working with CF StackSets to deploy to multiple accounts - but we can't find a way to generate a notification/message to be sent once the StackSet is finished (=when stack is deployed on all selected devices).

Any advice?

Thanks!

3 Antworten
1

I don't believe this capability exists yet, but based on this, is being actively worked on.

As a workaround, you could wrap the CFN template you're deploying in another template which simply has a single resource of an AWS::CloudFormation::Stack. In that resource you can define a Notification ARN where it will send SNS notifications. Subscribe a Lambda function to the SNS topic and every time it receives a message, it can check the status of the stack set and then take whatever action you want when it is finished.

AWS
mike
beantwortet vor 2 Jahren
  • Nice to know they are working on that. I will try the workaround you suggested, seems like a good idea. Thank you!

0

Are you using AWS Organizations to manage your StackSets? You can configure SNS to allow any account in your organization to publish messages to a topic. https://aws.amazon.com/premiumsupport/knowledge-center/sns-topic-organization-accounts-publish/

beantwortet vor 2 Jahren
  • Yes, we use Orgs. we make the accounts send an SNS after the individual stack is finished (as a custom resource in the stack) but we don't know when the StackSet is finished, as people can choose to onboard OUs instead of the entire Org.

0

This is now possible with CloudFormation StackSets now sending events notifications in Amazon EventBridge. EventBridge Rules can be created to get triggered based on StackSet creation/updation/deletion and based upon StackSet state/Stack Instance state/StackSet operation state which can trigger desired target(s) accordingly.

Ref.: https://aws.amazon.com/about-aws/whats-new/2022/11/event-driven-applications-cloudformation-stacksets-event-notifications-eventbridge/

AWS
SUPPORT-TECHNIKER
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen