CloudFormation 스택 알림 미설정

스택 이벤트를 받을 SNS 토픽을 구성하세요.

설명

중첩 CloudFormation 스택의 생성·업데이트·롤백 이벤트를 SNS로 받으려면 해당 스택의 NotificationARNs에 주제를 지정하세요.

잠재적 영향

다른 알림 경로도 없다면 운영자가 배포 실패나 롤백을 늦게 발견할 수 있습니다.

해결 방법

CloudFormation의 주제 게시 권한과 담당자의 SNS 구독을 확인하세요. 중첩 스택에서 발생한 이벤트를 실제로 받는지 시험하세요.

예시

두 번째 템플릿은 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

참조