[Tidbit] A Note on Why You Should Set EnablePerformanceInsights = true When Creating Amazon RDS with IaC

[Tidbit] A Note on Why You Should Set EnablePerformanceInsights = true When Creating Amazon RDS with IaC

Sharing an experience building an RDS environment with IaC after Performance Insights was deprecated: the changed role of the EnablePerformanceInsights parameter disabled Database Insights metric collection. Includes the fix.
2026.10.28

This page has been translated by machine translation. View original

This is Shibata.

As the title says, I ran into a bit of trouble when creating an Amazon RDS instance using IaC, so I'd like to share it in this article.

Background

The premise of this article is that, from the end of last year into this year, RDS Performance Insights was integrated into CloudWatch Database Insights.

https://dev.classmethod.jp/articles/eol-performance-insights/

As I recall, this integration did not proceed as scheduled and was postponed for a while even after the start of this year.
That said, the integration is now complete, and there are no Performance Insights settings at all on the RDS settings screen in the Management Console.

In this situation, I needed to set up a new RDS environment (RDS for PostgreSQL at the time) for work, so I built the environment using Terraform.
When creating an RDS environment with IaC such as Terraform, the parameters that used to relate to Performance Insights are

and both correspond to the EnablePerformanceInsights parameter of the RDS REST API.

At that time, I decided, "Performance Insights is gone now, so this value should be false," but this setting resulted in unintended behavior.

What Happened

I got stuck on this with Terraform back then, but this time I've prepared minimal reproduction code using CloudFormation.

再現CloudFormationテンプレート(最低限)
AWSTemplateFormatVersion: "2010-09-09"
Description: Amazon RDS for PostgreSQL Sample
Parameters:
  DBSubnetGroupName:
    Type: String
    Description: DB subnet group name
  SecurityGroupID:
    Type: AWS::EC2::SecurityGroup::Id
    Description: RDS Security group ID
Resources:
  # Sample RDS Instance (Single-AZ)
  DBInstance:
    Type: AWS::RDS::DBInstance
    Properties:
      DBInstanceIdentifier: "sample-instance"
      Engine: postgres
      EngineVersion: "18.6"
      DBInstanceClass: "db.t4g.medium"
      DBName: "mydb"
      MasterUsername: "postgres"
      ManageMasterUserPassword: true
      MultiAZ: false
      StorageType: gp3
      AllocatedStorage: 20
      StorageEncrypted: true
      DBSubnetGroupName:
        Ref: DBSubnetGroupName
      VPCSecurityGroups:
        - Ref: SecurityGroupID
      PubliclyAccessible: false
      DeletionProtection: false
      # ここからDatabase Insights関連設定
      DatabaseInsightsMode: "standard"
      EnablePerformanceInsights: false # もうPerformance Insightsは無効で良いと思っていた...

This is a template that creates a Single-AZ RDS for PostgreSQL instance with the bare minimum settings.
You need to prepare a security group and a DB subnet group beforehand.

What matters in this code is the last part

問題の設定
# ここからDatabase Insights関連設定
DatabaseInsightsMode: "standard"
EnablePerformanceInsights: false # もうPerformance Insightsは無効で良いと思っていた...

I wrote it this way with the intention of using Database Insights in standard mode and disabling Performance Insights, which I would not be using.
The environment created from the template looks like this.

When I checked the "Monitoring" tab of this instance, it showed

To view the database load chart, enable Performance Insights from Modify.

and some metrics were not being collected.


An unintended notice is displayed

The Database Insights dashboard also looks odd in the "Database load" section...


The database load isn't displayed at all...

Solution

I didn't realize this until I wrote this article, but after Performance Insights was discontinued, EnablePerformanceInsights changed its role to the "Collect detailed database and per-query metrics" setting, and disabling (unchecking) this field stops the metrics collection that Performance Insights used to handle.


"Collect detailed database and per-query metrics" is disabled

So if you check "Collect detailed database and per-query metrics," the behavior returns to what you expect, and this corresponds to EnablePerformanceInsights = true.


In standard mode, check it to enable

Like enabling Performance Insights, this setting change can be made immediately and did not cause the RDS instance to restart.

After the change, the database load is displayed in the "Monitoring" tab and in Database Insights.


The database load section is displayed as expected


Database Insights is also displayed as expected

By the way, the following documentation describes the "Collect detailed database and per-query metrics" setting whose role was changed.

The specifications of Database Insights are as follows:

  • It is enabled automatically if you choose Advanced mode
  • In Standard mode it can be turned on or off; when on, 7-day retention is free, and retention beyond 7 days incurs additional charges

The fact that retention beyond 7 days incurs additional charges seems to be carried over from Performance Insights.

Conclusion

This was brief, but that's all.

This was a case where an existing parameter name changed its role due to a specification change on the AWS side.
As a result, it's hard to infer the behavior from the name, so please be careful.

Share this article

AWSのお困り事はクラスメソッドへ