错误:DBClusterInstanceClass不支持DB engine aurora-mysql | Cloudformation。

0

【以下的问题经过翻译处理】 你好团队,

我创建了一个用于aurora-mysql8.0的CloudFormation模板。但是在运行模板时,我遇到了错误:DBClusterInstanceClass不支持DB引擎aurora-mysql。我不确定是否需要从模板中删除此选项,因为那样我将无法设置DBClusterInstance类型。

模板如下:

‘’‘ Parameters: DatabaseName: Default: MyDatabase Description: The database name Type: String MinLength: '1' MaxLength: '64' AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*' ConstraintDescription: must begin with a letter and contain only alphanumeric characters. DBUser: NoEcho: 'false' Description: The database admin account username Type: String MinLength: '1' MaxLength: '16' DBPassword: NoEcho: 'true' Description: The database admin account password Type: String MinLength: '8' MaxLength: '41' DBClusterInstanceClass: Description: Instance class for RDS Type: String MinLength: '1' MaxLength: '16' AllocatedStorage: Description: Required storage Type: Number Engine: Description: DB Engine Type: String Default: aurora-mysql MinLength: '1' MaxLength: '16' EngineVersion: Description: RDS version Type: String Default: 8.0.mysql_aurora.3.02.1 BackupRetentionPeriod: Description: RDS retention period Type: String DBClusterIdentifier: Description: DB identifier Type: String BackupRetentionPeriod: Description: RDS retention period Type: String EnablePerformanceInsights: Description: Enable or Disable performance insight Type: String PreferredBackupWindow: Description: Backup window Type: String PreferredMaintenanceWindow: Description: Maintainence window Type: String VpcSecurityGroupIds: Description: SG for RDS Type: String SubnetID1: Description: Subnets for the RDS in subnet group Type: String SubnetID2: Description: Subnets for the RDS in subnet group Type: String MonitoringRoleArn: Description: RDS Monitoring Role Type: String Resources: MyDB: Type: AWS::RDS::DBCluster Properties: DatabaseName: !Ref 'DatabaseName' AllocatedStorage: !Ref 'AllocatedStorage' DBClusterInstanceClass: !Ref 'DBClusterInstanceClass' Engine: !Ref 'Engine' EngineVersion: !Ref 'EngineVersion' BackupRetentionPeriod: !Ref 'BackupRetentionPeriod' DBClusterIdentifier: !Ref 'DBClusterIdentifier' DBSubnetGroupName: !Ref 'MYSubnetGroup' EnableCloudwatchLogsExports: - audit - error PerformanceInsightsEnabled: !Ref 'EnablePerformanceInsights' PreferredBackupWindow: !Ref 'PreferredBackupWindow' PreferredMaintenanceWindow: !Ref 'PreferredMaintenanceWindow' PubliclyAccessible: False StorageEncrypted: True StorageType: gp2 MonitoringInterval: 60 MonitoringRoleArn: !Ref 'MonitoringRoleArn' VpcSecurityGroupIds: - !Ref 'VpcSecurityGroupIds' MasterUsername: !Ref 'DBUser' MasterUserPassword: !Ref 'DBPassword' DBClusterParameterGroupName: !Ref 'ClusterParameterGroup' DeletionProtection: True AutoMinorVersionUpgrade: True CopyTagsToSnapshot: True ClusterParameterGroup: Type: 'AWS::RDS::DBClusterParameterGroup' Properties: Description: Cluster Parameter group for RDS Family: aurora-mysql8.0 Parameters: require_secure_transport: 'ON' server_audit_logging: '1' MYSubnetGroup: Type: AWS::RDS::DBSubnetGroup Properties: DBSubnetGroupDescription: subnet group for the rds SubnetIds: - !Ref 'SubnetID1' - !Ref 'SubnetID2' ’‘’

谢谢。

1 回答
0

【以下的回答经过翻译处理】 对于DB引擎aurora-mysql,您应该使用CloudFormation资源类型AWS::RDS::DBClusterAWS::RDS::DBInstance的组合。然后,您可以通过AWS::RDS::DBInstanceDBInstanceClass属性来指定实例类型。

AWS CloudFormation文档中有一些关于创建Aurora DB的示例:https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-dbclusterinstanceclass。它使用的是aurora-postgresql,但您可以在创建您的aurora-mysql时将其作为参考。

profile picture
专家
已回答 8 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则