説明
ネストした CloudFormation スタックの作成・更新・ロールバックを SNS で通知する場合は、そのスタックの NotificationARNs にトピックを指定します。
想定される影響
ほかに通知経路がないと、担当者がデプロイ失敗やロールバックを見逃すおそれがあります。
対処方法
CloudFormation の発行権限と運用担当者のサブスクリプションを確認し、ネストしたスタックのイベントが届くことを検証してください。
例
2 つ目は myStackWithParams に stack-alerts を追加します。実際のネスト用テンプレートの URL と InstanceType、KeyName の値を指定してください。
変更前
yaml
Resources:
myStackWithParams:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: https://s3.amazonaws.com/cloudformation-templates-us-east-2/EC2ChooseAMI.template
Parameters:
InstanceType: t1.micro
KeyName: mykey
変更後
yaml
Resources:
myStackWithParams:
Type: AWS::CloudFormation::Stack
Properties:
NotificationARNs:
- "arn:aws:sns:ap-northeast-2:123456789012:stack-alerts"
TemplateURL: https://s3.amazonaws.com/cloudformation-templates-us-east-2/EC2ChooseAMI.template
Parameters:
InstanceType: t1.micro
KeyName: mykey