You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用AWS CDK部署Aurora Serverless PostgreSQL遇CloudWatch日志导出报错

问题:Aurora Serverless PostgreSQL部署时CloudWatch日志导出报错

报错信息:

Aurora postgres Serverless currently doesn't support CloudWatch Log Export.

DBCluster创建配置:

"rdsClusterParameterGroupFamily": "aurora-postgresql13",
"rdsClusterParameter": {
    "pgaudit.log": "ddl,write"
},
"rdsClusterNewSubnetGroup": true,
"rdsClusterDeletionProtection": true,
"rdsClusterEngine": "aurora-postgresql",
"rdsClusterEngineVersion": "13.7",
"rdsClusterCopyTagsToSnapshot": true,
"rdsClusterStorageEncrypted": true,
"engineMode": "serverless",
"scalingConfiguration": {
    "autoPause": false, 
    "minCapacity": 4, 
    "maxCapacity": 32, 
    "secondsUntilAutoPause": 300
},
"customDBBackup": false,
"rdsClusterEnableCloudwatchLogsExports": ["postgresql"]

已尝试官方文档要求的11.12以上版本,仍报错,求正确引擎版本或配置指导。


解决方案

  • 核心原因:你当前使用的是Aurora Serverless v1,该模式完全不支持CloudWatch日志导出功能,和引擎版本无关——哪怕是11.12及以上版本也无法启用该功能。只有Aurora Serverless v2支持CloudWatch日志导出。

  • 方案1:切换到Aurora Serverless v2

    • 调整配置:将原有的engineMode设为provisioned,用serverlessV2ScalingConfiguration替代scalingConfiguration,同时保留rdsClusterEnableCloudwatchLogsExports配置。
    • 示例调整后的关键配置:
      "engineMode": "provisioned",
      "serverlessV2ScalingConfiguration": {
          "minCapacity": 0.5,
          "maxCapacity": 32
      },
      "rdsClusterEnableCloudwatchLogsExports": ["postgresql"]
      
    • 注意:Serverless v2的容量单位为ACU(Aurora Capacity Unit),范围是0.5到128,和v1的容量单位逻辑不同。
  • 方案2:保留Serverless v1,移除日志导出配置

    • 删除配置中的rdsClusterEnableCloudwatchLogsExports字段,即可正常部署。若需要日志,可通过定期将数据库日志导出到S3,或直接查询数据库内置日志的方式替代。

内容的提问来源于stack exchange,提问作者Jaynil Savani

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.10 01:15:01