How to fix RDS: Parameter group cannot be modified in PostgreSQL

PostgreSQLBEGINNERMEDIUMUpdated Dec 29, 2025· 142 views

This error occurs in AWS RDS when attempting to modify parameters in a default parameter group, which is immutable. AWS restricts changes to default groups for safety. Create a custom parameter group instead and apply it to your RDS instance to resolve this issue.

Quick fix

Fixes InvalidParameterValue

aws rds create-db-parameter-group \
  --db-parameter-group-name postgres15-custom-params \
  --db-parameter-group-family postgres15 \
  --description "Custom parameter group for PostgreSQL 15"
  1. Create a custom parameter group from the RDS console
  2. Modify parameters in the custom parameter group
  3. Associate the custom parameter group with your RDS instance
  4. Reboot the instance if required for static parameters
postgresql — error
aws rds create-db-parameter-group \
--db-parameter-group-name postgres15-custom-params \
--db-parameter-group-family postgres15 \
--description "Custom parameter group for PostgreSQL 15"
RDS: Parameter group cannot be modified

What this error means

When using AWS RDS for PostgreSQL, the system provides default parameter groups that are managed by AWS and cannot be modified. These defaults are intentionally locked to prevent accidental misconfiguration that could affect database stability or security. When you attempt to change any parameter value in a default parameter group (such as shared_preload_libraries, max_connections, or work_mem), AWS RDS rejects the modification with an InvalidParameterValue error. This is a safety mechanism: default parameter groups serve as read-only references. Custom parameter groups, on the other hand, are fully editable and can be associated with your RDS instances. RDS allows multiple parameter groups per instance and supports changing which group is active.

Typical symptoms

  • AWS RDS console shows "Cannot modify a default parameter group" error when saving changes
  • CLI command aws rds modify-db-parameter-group fails with InvalidParameterValue
  • Terraform or CloudFormation deployment fails when attempting to modify default parameter group
  • pgAdmin or other database tools show parameter group as read-only
  • Custom parameters like shared_preload_libraries cannot be set

Common causes

  1. Attempting to modify parameters in an AWS-provided default parameter group (default.postgres14, default.postgres15, etc.)
  2. Parameter group was not created as a custom group—it was automatically created when the RDS instance was provisioned
  3. Misunderstanding that default parameter groups in RDS are immutable unlike self-managed PostgreSQL
  4. Terraform or IaC configuration targets the wrong parameter group name
  5. Parameter group is still in "pending-reboot" state from a previous modification attempt

How to fix "RDS: Parameter group cannot be modified"

1Create a custom parameter group from the RDS console

Navigate to the RDS dashboard and create a new parameter group based on your PostgreSQL version.

1. Go to Parameter groups in the AWS RDS console
2. Click Create parameter group
3. Select your PostgreSQL version (e.g., postgres15) from the Parameter group family dropdown
4. Give it a descriptive name like postgres15-custom-params
5. Add an optional description
6. Click Create

Alternatively, using the AWS CLI:

bash
aws rds create-db-parameter-group \
  --db-parameter-group-name postgres15-custom-params \
  --db-parameter-group-family postgres15 \
  --description "Custom parameter group for PostgreSQL 15"
2Modify parameters in the custom parameter group

Now that you have a custom parameter group, you can modify its parameters.

1. Go to Parameter groups and click your custom group name
2. Click Edit or Modify
3. Search for and modify the parameter you need (e.g., shared_preload_libraries)
4. For shared_preload_libraries, enter: pg_stat_statements
5. Click Save changes

Using the AWS CLI:

bash
aws rds modify-db-parameter-group \
  --db-parameter-group-name postgres15-custom-params \
  --parameters "ParameterName=shared_preload_libraries,ParameterValue=pg_stat_statements,ApplyMethod=pending-reboot" \
  --region us-east-1
3Associate the custom parameter group with your RDS instance

Next, apply the custom parameter group to your RDS database instance.

1. Go to Databases in the RDS console
2. Click on your PostgreSQL instance
3. Click Modify
4. Under DB parameter group, select your custom parameter group (e.g., postgres15-custom-params)
5. Under Scheduling of modifications, choose Apply immediately or Apply during maintenance window
6. Click Continue and then Modify DB instance

Using the AWS CLI:

bash
aws rds modify-db-instance \
  --db-instance-identifier my-postgres-instance \
  --db-parameter-group-name postgres15-custom-params \
  --apply-immediately \
  --region us-east-1
4Reboot the instance if required for static parameters

Some parameters are dynamic and apply immediately, while others are static and require a reboot.

Check the parameter's Apply type in the parameter group details:
- Dynamic: Changes apply immediately, no reboot needed
- Static: Changes apply after reboot

If you modified a static parameter, reboot the instance:

1. Go to Databases and select your instance
2. Click Reboot
3. Choose Reboot with failover (if using Multi-AZ for zero downtime) or Reboot (standalone)
4. Confirm the reboot

Using the AWS CLI:

bash
aws rds reboot-db-instance \
  --db-instance-identifier my-postgres-instance \
  --region us-east-1

Wait for the instance status to change from "rebooting" to "available".

5Verify the parameter change took effect

After the instance is available (and rebooted if necessary), verify the parameter was applied:

1. Connect to your PostgreSQL database using psql:

bash
psql -h <rds-endpoint> -U postgres -d postgres

2. Check the parameter value:

sql
SHOW shared_preload_libraries;
-- Should output: pg_stat_statements

3. In the RDS console, check the instance details under Parameter groups—status should show "in sync" (not "pending reboot").

If it shows "pending reboot", another parameter reboot is needed or the previous reboot did not complete successfully.

Advanced notes

Custom Parameter Groups vs. Defaults: Every RDS instance must use a parameter group, either default or custom. You can only have one parameter group active per instance at a time, but you can switch between multiple custom parameter groups at any point. When you create a custom group from a default, it inherits the default values but becomes fully editable.

Dynamic vs. Static Parameters: PostgreSQL distinguishes between parameters that require a server restart and those that don't. RDS respects this distinction—if you modify a static parameter (marked "Apply type: static"), AWS shows the status as "pending reboot" until you manually reboot. For dynamic parameters, changes apply immediately even without setting apply_immediately.

Terraform and IaC: If using Terraform, ensure your aws_db_parameter_group resource has create_before_destroy = true to prevent deletion races when switching groups. Also verify that you're targeting a custom group, not a default.

Parameter Group Families: Parameter group families are tied to PostgreSQL major versions (postgres13, postgres14, postgres15, etc.). You cannot apply a postgres14 parameter group to a postgres15 instance. When upgrading your RDS instance, you must also create or select a parameter group matching the target version.

Frequently asked questions

What does "InvalidParameterValue" mean?
When using AWS RDS for PostgreSQL, the system provides default parameter groups that are managed by AWS and cannot be modified. These defaults are intentionally locked to prevent accidental misconfiguration that could affect database stability or security. When you attempt to change any parameter value in a default parameter group (such as shared_preload_libraries, max_connections, or work_mem), AWS RDS rejects the modification with an InvalidParameterValue error.
How do I fix "InvalidParameterValue"?
This error occurs in AWS RDS when attempting to modify parameters in a default parameter group, which is immutable. AWS restricts changes to default groups for safety. Create a custom parameter group instead and apply it to your RDS instance to resolve this issue.
What causes "InvalidParameterValue"?
Attempting to modify parameters in an AWS-provided default parameter group (default.postgres14, default.postgres15, etc.) Parameter group was not created as a custom group—it was automatically created when the RDS instance was provisioned Misunderstanding that default parameter groups in RDS are immutable unlike self-managed PostgreSQL
Is the "InvalidParameterValue" error serious?
It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading