Cloudformation 使用引擎 aurora-postgresql 和 enginemode 创建 RDS 集群:serverless

Cloudformation to create an RDS cluster with engine aurora-postgresql and enginemode: serverless

我正在尝试使用 cloudformation 创建一个 amazon RDS 集群。我遇到问题的两个属性是 Engine: aurora-postgresqlEngineMode: serverless

这是我的模板:

  AuroraDBCluster:
    Type: AWS::RDS::DBCluster
    DeletionPolicy: Snapshot
    UpdateReplacePolicy: Snapshot
    Properties:
      BackupRetentionPeriod: 7
      DatabaseName: MyDBNameHere
      DBClusterParameterGroupName: !Ref RDSDBClusterParameterGroup
      DBSubnetGroupName: !Ref DBSubnetGroup
      EnableHttpEndpoint: true
      Engine: aurora-postgresql
      EngineMode: serverless
      EngineVersion: 11.7      
      MasterUsername:
        shhhh
      MasterUserPassword:
        bequiet
      Port: 5432
      VpcSecurityGroupIds:
      - !Ref MyReferenceHere

我知道这类似于 , 但我的理解是设置 Engine: aurora 用于 MySql 而不是用于 postgresql。

我 运行 使用 Bitbucket 管道时出现错误。 The engine mode serverless you requested is currently unavailable.

提前致谢。

原因可能是您使用的是 PostgreSQL 11.7。

docs开始, Aurora Serverless只支持:

Aurora with PostgreSQL version 10.7 compatibility.

我完整的工作 Aurora Postgres 无服务器 DBCluster 资源是:

  RDSCluster:
    Type: AWS::RDS::DBCluster
    Properties:
      DBClusterIdentifier: !Ref DBClusterName
      MasterUsername: some-name
      MasterUserPassword: some-password
      DatabaseName: some-db-name
      Engine: aurora-postgresql
      EngineMode: serverless
      EngineVersion: '10' # this currently provisions '10.serverless_14'
      ScalingConfiguration:
        AutoPause: true
        MaxCapacity: 2
        MinCapacity: 2 # min 2 currently
        SecondsUntilAutoPause: 900 # 15 min
      DBSubnetGroupName:
        Ref: DBSubnetGroup