Associating a DB parameter group with a DB instance in Amazon RDS - Amazon Relational Database Service

Associating a DB parameter group with a DB instance in Amazon RDS

You can create your own DB parameter groups with customized settings. You can associate a DB parameter group with a DB instance using the AWS Management Console, the AWS CLI, or the RDS API. You can do so when you create or modify a DB instance.

For information about creating a DB parameter group, see Creating a DB parameter group in Amazon RDS. For information about creating a DB instance, see Creating an Amazon RDS DB instance. For information about modifying a DB instance, see Modifying an Amazon RDS DB instance.

Note

When you associate a new DB parameter group with a DB instance, the modified static and dynamic parameters are applied only after the DB instance is rebooted. However, if you modify dynamic parameters in the DB parameter group after you associate it with the DB instance, these changes are applied immediately without a reboot.

To associate a DB parameter group with a DB instance
  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the navigation pane, choose Databases, and then choose the DB instance that you want to modify.

  3. Choose Modify. The Modify DB instance page appears.

  4. Change the DB parameter group setting.

  5. Choose Continue and check the summary of modifications.

  6. (Optional) Choose Apply immediately to apply the changes immediately. Choosing this option can cause an outage in some cases. For more information, see Schedule modifications setting.

  7. On the confirmation page, review your changes. If they are correct, choose Modify DB instance to save your changes.

    Or choose Back to edit your changes or Cancel to cancel your changes.

To associate a DB parameter group with a DB instance, use the AWS CLI modify-db-instance command with the following options:

  • --db-instance-identifier

  • --db-parameter-group-name

The following example associates the mydbpg DB parameter group with the database-1 DB instance. The changes are applied immediately by using --apply-immediately. Use --no-apply-immediately to apply the changes during the next maintenance window. For more information, see Schedule modifications setting.

Example

For Linux, macOS, or Unix:

aws rds modify-db-instance \ --db-instance-identifier database-1 \ --db-parameter-group-name mydbpg \ --apply-immediately

For Windows:

aws rds modify-db-instance ^ --db-instance-identifier database-1 ^ --db-parameter-group-name mydbpg ^ --apply-immediately

To associate a DB parameter group with a DB instance, use the RDS API ModifyDBInstance operation with the following parameters:

  • DBInstanceName

  • DBParameterGroupName