-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not enable Performance Insights for DatabaseCluster #5195
Comments
Hey @vertti , unfortunately, the Thanks, |
Closing this issue. Feel free to reopen. |
We are also facing this issue. Currently our workaround is to get the instance identifiers and then enable performance insights using the SDK, which feels like a hack. What is the recommended way to enable performance insights using CDK on instances created using |
You can now enable performance insights with CDK v2 by setting https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.InstanceProps.html |
@mikevoets no way to do it with CDK v1 ? |
There doesn't seem to be any official way to do it in CDK v1. I don't know v1 so I don't know if there's any workaround. |
after a full day of diving, with 1.135.0 i did this: const kmsKey = kms.Key.fromKeyArn(
this,
"rdsKmsKeyForPerformanceInsights",
RDS_KMS_KEY_ARN
);
new rds.DatabaseCluster(this, "Database", {
credentials,
engine: rds.DatabaseClusterEngine.auroraPostgres({
version: rds.AuroraPostgresEngineVersion.VER_13_4,
}),
instanceProps: {
enablePerformanceInsights: true,
parameters: {
log_min_duration_statement: 500,
},
performanceInsightEncryptionKey: kmsKey,
performanceInsightRetention: rds.PerformanceInsightRetention.LONG_TERM,
instanceType: ec2.InstanceType.of(
ec2.InstanceClass.BURSTABLE3,
ec2.InstanceSize.XLARGE
),
vpc,
},
removalPolicy: cdk.RemovalPolicy.RETAIN,
}); |
It's wild, that despite it being Q4 2024 and instanceProps being deprecated, there is no way to do this via the CDK still |
@MichaelWalker-git This is how I solved it via CDK: new rds.DatabaseCluster(this, "Database", {
vpc,
writer: rds.ClusterInstance.provisioned('WriterInstance', {
instanceType: new ec2.InstanceType('t3.medium'),
enablePerformanceInsights: true,
// other instance properties...
}),
// other cluster properties...
}); |
I would like to enable Performance Insights for my RDS Postgresql cluster but it doesn't seem to be possible.
Reproduction Steps
DatabaseInstanceProps
has a keyenablePerformanceInsights
butDatabaseClusterProps
does not have that key. Also theinstanceProps
contained insideDatabaseClusterProps
isInstanceProps
type and does not have theenablePerformanceInsights
key either.Environment
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: