“在Aurora中创建ClusterParameterGroup时,属性参数不能为空

问题描述 投票:0回答:1

我正在使用AWS CDK部署Aurora RDS集群。

const cluster = new rds.DatabaseCluster(this, 'id', {
      ...
      parameterGroup: new rds.ClusterParameterGroup(this,'id', { 
           family: 'aurora-postgresql11'
}})

从ClusterParameterGroup构造中抛出Property Parameters cannot be empty。知道为什么吗?

[当我尝试使用ClusterParameterGroup.fromParameterGroupName(this, "id", [a group that I manually created in the account]时有效。

这里的问题是,我不想使用RDS创建的默认ParameterGroup,因为它们是不可修改的。

amazon-web-services amazon-rds-aurora aws-cdk
1个回答
0
投票

您可以自己创建ClusterParameterGroup,然后将其传递给DatabaseCluster

代码段:

const rdsClusterPrameterGroup = new rds.ClusterParameterGroup(this, 'rdsClusterPrameterGroup', {
  parameters: {
    max_connections: props.AURORA_MAX_CONNECTIONS
  },
  family: props.AURRORA_DATABASE_FAMILY
});
const cluster = new rds.DatabaseCluster(this, 'id', {
      ...
      parameterGroup: rdsClusterPrameterGroup
}})

有关ClusterParameterGroup的更多信息。

© www.soinside.com 2019 - 2024. All rights reserved.