private addNotCompliancyNotificationMechanism()

in source/aws-bootstrap-kit/lib/secure-root-user.ts [81:115]


  private addNotCompliancyNotificationMechanism(enforceMFARule: config.ManagedRule, autoRemediationRole: iam.Role, secureRootUserConfigTopic: sns.Topic, message: string) {
    new config.CfnRemediationConfiguration(this, `Notification-${enforceMFARule.node.id}`, {
      configRuleName: enforceMFARule.configRuleName,
      targetId: "AWS-PublishSNSNotification",
      targetType: "SSM_DOCUMENT",
      targetVersion: "1",
      automatic: true,
      maximumAutomaticAttempts: 1,
      retryAttemptSeconds: 60,
      parameters: {
        AutomationAssumeRole: {
          StaticValue: {
            Values: [
              autoRemediationRole.roleArn
            ]
          }
        },
        TopicArn: {
          StaticValue: {
            Values: [
              secureRootUserConfigTopic.topicArn
            ]
          }
        },
        Message: {
          StaticValue: {
            Values: [
              // WARNING: Limited to 256 char
              message
            ]
          }
        }
      }
    });
  }