- Newest
- Most votes
- Most comments
For DB engine aurora-mysql
, you should use a combination of CloudFormation resource types AWS::RDS::DBCluster
and AWS::RDS::DBInstance
. Then, you specify the instance type via DBInstanceClass
property of AWS::RDS::DBInstance
.
The AWS CloudFormation documentation has some examples on creating an Aurora DB: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-dbclusterinstanceclass. It's using aurora-postgresql
, but you can use it as reference when creating your aurora-mysql
.
Hi! You can use the below command to determine db instance classes supported in a region based on engine and engine-version.
aws rds describe-orderable-db-instance-options --engine aurora-mysql --engine-version 8.0.mysql_aurora.3.02.1 --query "OrderableDBInstanceOptions[].{DBInstanceClass:DBInstanceClass,SupportedEngineModes:SupportedEngineModes[0]}" --output table
Thanks Rares. I tried that but it gave the same error. However later I found that we need to use io1 storage type instead of gp2 for multiaz and we need to add iops parameter as well.
StorageType Specifies the storage type to be associated with the DB cluster.
This setting is required to create a Multi-AZ DB cluster.
Valid values: io1
When specified, a value for the Iops parameter is required.
Default: io1
Valid for: Multi-AZ DB clusters only
Required: No
Type: String
Update requires: No interruption
But while doing so it gave me another error:
error: "Iops isn't supported for DB engine aurora-mysql.
And when I am removing the iops parameter from the template, I back to the old error:
error: DBClusterInstanceClass isn't supported for DB engine aurora-mysql
Thank you for your question.
StorageType
only apply for RDS, and RDS Multi-AZ cluster(not Aurora).
To create Aurora cluster, and instances, please use two separate section like below code snippet. This is minimum snippet, and reference purpose only. So please add necessary section, and settings as you want.
Resources: DBCluster: Type: AWS::RDS::DBCluster DeletionPolicy: Snapshot Properties: Engine: aurora-mysql EngineVersion: 8.0.mysql_aurora.3.02.1 DBInstance1: Type: AWS::RDS::DBInstance Properties: Engine: aurora-mysql DBClusterIdentifier: !Ref "DBCluster" DBInstanceClass: !Ref "DBClusterInstanceClass" DBSubnetGroupName: !Ref "DBSubnetGroup" DBParameterGroupName: !Ref "DBParameterGroup"
I hope this might help.
Template format error: Unresolved resource dependencies [DBClusterInstanceClass] in the Resources block of the template getting this error from the cloud template following is the my Yaml code
AuroraDBCluster: Type: AWS::RDS::DBCluster Properties: Engine: aurora-mysql EngineVersion: 8.0.mysql_aurora.3.02.1 MasterUsername: admin MasterUserPassword: DBClusterIdentifier: database-1 DBSubnetGroupName: !Ref AuroraSubnetGroup VpcSecurityGroupIds: - !Ref DatabaseSecurityGroup
AuroraDBInstance: Type: AWS::RDS::DBInstance Properties: DBClusterIdentifier: !Ref AuroraDBCluster Engine: aurora-mysql DBInstanceClass: !Ref "DBClusterInstanceClass" AvailabilityZone: ap-south-1c # You can specify any AZ here DBSubnetGroupName: !Ref AuroraSubnetGroup PubliclyAccessible: false VPCSecurityGroups: - !Ref DatabaseSecurityGroup
what is the solution for me?
Relevant content
- asked 9 months ago
- AWS OFFICIALUpdated 19 days ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a year ago
Thanks Joahna! This worked.