【以下的问题经过翻译处理】 你好团队,
我创建了一个用于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'
’‘’
谢谢。