How to send SNS notification after cloud formation is completed?

后端 未结 4 2081
南旧
南旧 2020-12-31 03:47

Is it possible to send a SNS notification after the CFT completion in AWS ? Is there any way to get the progress of the launching CFT in AWS.

4条回答
  •  遥遥无期
    2020-12-31 04:12

    You can trick CloudFormation into sending SNS messages from inside the template:

    https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html

    Custom resources enable you to write custom provisioning logic in templates that AWS CloudFormation runs anytime you create, update (if you changed the custom resource), or delete stacks. For example, you might want to include resources that aren't available as AWS CloudFormation resource types. You can include those resources by using custom resources. That way you can still manage all your related resources in a single stack.

    Use the AWS::CloudFormation::CustomResource or Custom::String resource type to define custom resources in your templates. Custom resources require one property: the service token, which specifies where AWS CloudFormation sends requests to, such as an Amazon SNS topic.

提交回复
热议问题