您请求的引擎模式 serverless 目前在 5.7 (2.07.1) 中不可用

问题描述

尝试用 MysqL 2.07.1 少创建一个 RDS aurora 服务器 并收到错误“您请求的无服务器引擎模式当前不可用。(服务:AmazonRDS;状态代码:400;错误代码:InvalidParameterValue;请求 ID:xxxx;代理:null)”

任何建议都会对我有很大帮助

这是示例代码

{
  "AWstemplateFormatVersion" : "2010-09-09","Description" : "AWS CloudFormation Sample Template auroraServerlessDBCluster: Sample template showing how to create an Amazon aurora Serverless DB cluster. **WARNING** This template creates an Amazon aurora DB cluster. You will be billed for the AWS resources used if you create a stack from this template.","Parameters" : {
      "DBUsername" : {
        "NoEcho" : "true","Description" : "Username for MysqL database access","Type" : "String","MinLength" : "1","MaxLength" : "16","AllowedPattern" : "[a-zA-Z][a-zA-Z0-9]*","ConstraintDescription" : "must begin with a letter and contain only alphanumeric characters."
      },"DBPassword" : {
        "NoEcho" : "true","Description" : "Password MysqL database access","MinLength" : "8","MaxLength" : "41","AllowedPattern" : "[a-zA-Z0-9]*","ConstraintDescription" : "must contain only alphanumeric characters."
      }
  },"Resources" : {
      "RDSCluster" : {
          "Type": "AWS::RDS::DBCluster","Properties" : {
              "MasterUsername" : {
                  "Ref": "DBUsername"
              },"MasterUserPassword" : {
                  "Ref": "DBPassword"
              },"DBClusterIdentifier" : "my-serverless-cluster","Engine" : "aurora","EngineVersion" : "2.07.1","EngineMode" : "serverless","ScalingConfiguration" : {
                  "Autopause" : true,"MinCapacity" : 4,"MaxCapacity" : 32,"SecondsUntilAutopause" : 1000
              }
          }
      }
  }
}

解决方法

您正在尝试使用 Aurora MySQL 2.07.1(即 MySQL 5.7 版本[+] a link)创建 RDS aurora serverless。 查看上面的代码和模板参数,我可以看到您拥有的“Engine”参数是“aurora”,对于 MySQL 5.7 版本 [+] (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-engine),它应该是“aurora-mysql”。