AWS Cloudformation RDS EnablePerformanceInsights无法正常工作

问题描述

我想通过Clouformation创建RDS实例。在cloudformation文件的摘录下面。

  MasterDB:
    Type: AWS::RDS::DBInstance
    Properties:
      dbname: !Ref dbname
      DBInstanceIdentifier: !Ref dbname
      BackupRetentionPeriod: !Ref DBBackupRetentionPeriod
      AllocatedStorage: !Ref DBAllocatedStorage
      DBInstanceClass: "db.t3.medium"
      DBsubnetGroupName: !Ref DBsubnetGroup
      Engine: MysqL
      AvailabilityZone: !Ref DBAvailabilityZone
      EngineVersion: "5.7.30"
      MasterUsername: !Sub "{{resolve:ssm:/DB/USER:1}}"
      MasterUserPassword: !Sub "{{resolve:ssm-secure:/DB/PASSWORD:1}}"
      MultiAZ: !Ref MultiAZ
      EnablePerformanceInsights: 'true'
      DeletionProtection: 'true'
      DBParameterGroupName: !Ref RDSDBParameterGroup

创建RDS没问题,但是我注意到在新实例上未启用Performance Insights和Deletion保护。

您能建议为什么这些选项不起作用吗?

解决方法

验证了您在us-east-1的沙盒帐户中的模板,并按预期启用了洞察力和删除保护。

我使用的模板如下(大部分只是注释掉问题中未显示的参考文献):

Resources:
  MasterDB:
    Type: AWS::RDS::DBInstance
    Properties:
      #DBName: !Ref DBName
      #DBInstanceIdentifier: !Ref DBName
      BackupRetentionPeriod: 0
      AllocatedStorage: 20
      DBInstanceClass: "db.t3.medium"
      #DBSubnetGroupName: !Ref DBSubnetGroup
      Engine: MySQL
      #AvailabilityZone: !Ref DBAvailabilityZone
      EngineVersion: "5.7.30"
      MasterUsername: root
      MasterUserPassword: fsdf45454
      MultiAZ: false
      EnablePerformanceInsights: 'true'
      DeletionProtection: 'true'

enter image description here