使用 Babelfish 创建 Aurora 集群启用 Cloud Formation

Create Aurora Cluster with Babelfish enables using Cloud Formation

我们有什么方法可以创建一个 Aurora RDS 集群多可用区,并使用云形成启用 Babelfish。我们可以使用 [console 或 cli][1] 创建它。但是,我想使用 Cloudformation 创建它。我在以下可用选项中找不到选项。

DBCluster:
Type: AWS::RDS::DBCluster
Properties:
  AssociatedRoles:
    AssociatedRoles
  AvailabilityZones:
    AvailabilityZones
  BacktrackWindow: Number
  BackupRetentionPeriod: Number
  CopyTagsToSnapshot: false
  DBClusterIdentifier: "String"
  DBClusterParameterGroupName: "String"
  DBSubnetGroupName: "String"
  DatabaseName: "String"
  DeletionProtection: false
  EnableCloudwatchLogsExports:
    EnableCloudwatchLogsExports
  EnableHttpEndpoint: false
  EnableIAMDatabaseAuthentication: false
  Engine: "String" # Required
  EngineMode: "String"
  EngineVersion: "String"
  GlobalClusterIdentifier: "String"
  KmsKeyId: "String"
  MasterUserPassword: "String"
  MasterUsername: "String"
  Port: Number
  PreferredBackupWindow: "String"
  PreferredMaintenanceWindow: "String"
  ReplicationSourceIdentifier: "String"
  RestoreType: "String"
  ScalingConfiguration:
    AutoPause: false
    MaxCapacity: Number
    MinCapacity: Number
    SecondsUntilAutoPause: Number
  SnapshotIdentifier: "Number"
  SourceDBClusterIdentifier: "Number"
  SourceRegion: "Number"
  StorageEncrypted: false
  Tags:
    Tags
  UseLatestRestorableTime: false
  VpcSecurityGroupIds:
    VpcSecurityGroupIds

甚至在实例级别都没有

DBInstance:
Type: AWS::RDS::DBInstance
Properties:
  AllocatedStorage: "String"
  AllowMajorVersionUpgrade: false
  AssociatedRoles:
    AssociatedRoles
  AutoMinorVersionUpgrade: false
  AvailabilityZone: "String"
  BackupRetentionPeriod: Number
  CACertificateIdentifier: "String"
  CharacterSetName: "String"
  CopyTagsToSnapshot: false
  DBClusterIdentifier: "String"
  DBInstanceClass: "String" # Required
  DBInstanceIdentifier: "String"
  DBName: "String"
  DBParameterGroupName: "String"
  DBSecurityGroups:
    DBSecurityGroups
  DBSnapshotIdentifier: "String"
  DBSubnetGroupName: "String"
  DeleteAutomatedBackups: false
  DeletionProtection: false
  Domain: "String"
  DomainIAMRoleName: "String"
  EnableCloudwatchLogsExports:
    EnableCloudwatchLogsExports
  EnableIAMDatabaseAuthentication: false
  EnablePerformanceInsights: false
  Engine: "String"
  EngineVersion: "String"
  Iops: Number
  KmsKeyId: "String"
  LicenseModel: "String"
  MasterUserPassword: "String"
  MasterUsername: "String"
  MaxAllocatedStorage: Number
  MonitoringInterval: Number
  MonitoringRoleArn: "String"
  MultiAZ: false
  OptionGroupName: "String"
  PerformanceInsightsKMSKeyId: "String"
  PerformanceInsightsRetentionPeriod: Number
  Port: "String"
  PreferredBackupWindow: "String"
  PreferredMaintenanceWindow: "String"
  ProcessorFeatures:
    ProcessorFeatures
  PromotionTier: Number
  PubliclyAccessible: false
  SourceDBInstanceIdentifier: "String"
  SourceRegion: "String"
  StorageEncrypted: false
  StorageType: "String"
  Tags:
    Tags
  Timezone: "String"
  UseDefaultProcessorFeatures: false
  VPCSecurityGroups:
    VPCSecurityGroups

感谢大家的宝贵时间和帮助。 [1]: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/babelfish-create.html

好吧,我从其他地方得到了这个问题的答案,它与@SilentSteel 在他的评论中提到的一样。您必须使用 babel fish 选项 'on' 创建一个新的数据库集群参数组,并将该参数组分配给集群。不过babel fish只在postgresql13及之后的版本才支持

RDSClusterParameterGroupforBF:
Type: AWS::RDS::DBClusterParameterGroup
Properties:
  Description: "Parameter Group for adding BableFish support in Aurora PostgreSQL" # Required
  Family: "aurora-postgresql13" # Required
  Parameters:
    rds.babelfish_status: 'on'

然后在集群中,您将使用

分配它
RDSCluster:
Type: 'AWS::RDS::DBCluster'
Properties:
  MasterUsername: !Join ['', ['{{resolve:secretsmanager:', !Ref MyRDSSecret, ':SecretString:username}}' ]]
  MasterUserPassword: !Join ['', ['{{resolve:secretsmanager:', !Ref MyRDSSecret, ':SecretString:password}}' ]]
  DBClusterIdentifier: aurora-postgresql-cluster
  Engine: aurora-postgresql
  EngineVersion: '13.6'
  EngineMode: provisioned
  **DBClusterParameterGroupName: !Ref RDSClusterParameterGroupforBF**
  DBSubnetGroupName: !Ref AuroraDBSubnetGroup1
  DatabaseName: Sample
  Port: '5432'
  VpcSecurityGroupIds:
    - Ref: DatabaseSecurityGroup
  EnableCloudwatchLogsExports:
    - postgresql
  Tags: 
    - Key: Name
      Value: !Sub ${EnvironmentName} Aurora DB Cluster1