Menu
Amazon Relational Database Service
User Guide (API Version 2014-10-31)

Modifying a DB Instance Running the PostgreSQL Database Engine

You can change the settings of a DB instance to accomplish tasks such as adding additional storage or changing the DB instance class. This topic guides you through modifying an Amazon RDS PostgreSQL DB instance, and describes the settings for PostgreSQL instances. For information about additional tasks, such as renaming, rebooting, deleting, tagging, or upgrading an Amazon RDS DB instance, see Amazon RDS DB Instance Lifecycle. We recommend that you test any changes on a test instance before modifying a production instance so you better understand the impact of a change. This is especially important when upgrading database versions.

You can have the changes apply immediately or have them applied during the DB instance's next maintenance window. Applying changes immediately can cause an outage in some cases; for more information on the impact of the Apply Immediately option when modifying a DB instance, see Modifying an Amazon RDS DB Instance and Using the Apply Immediately Parameter.

AWS Management Console

To modify a PostgreSQL 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, click Instances.

  3. Select the check box for the DB instance that you want to change, and then click Modify.

  4. In the Modify DB Instance dialog box, change any of the following settings that you want:

    Setting Description

    Instance Specifications

    DB Engine Version

    In the list provided, click the version of the PostgreSQL database engine that you want to use.

    DB Instance Class

    In the list provided, click the DB instance class that you want to use. For information about instance classes, see DB Instance Class.

    Multi-AZ Deployment

    If you want to create a standby replica of your DB instance in another Availability Zone, click Yes; otherwise, click No. For more information on Multi-AZ deployments, see High Availability (Multi-AZ).

    Storage Type

    Select the storage type you want to use. These storage changes all result in a temporary outage of a few minutes:

    • Changing from Magnetic to General Purpose (SSD) or Provisioned IOPS (SSD).

    • Changing from Provisioned IOPS (SSD) or General Purpose (SSD) to Magnetic.

    • When using a custom DB parameter group, changing from either General Purpose (SSD) to Provisioned IOPS (SSD) or from Provisioned IOPS (SSD) to General Purpose (SSD).

      For more information about storage, see Storage for Amazon RDS.

    Allocated Storage

    Specify how much storage, in gigabytes, to allocate for your DB instance. The minimum allowable value is 5 GB; the maximum is 6 TB. Note that you can only increase the amount of storage when modifying a DB instance, you cannot reduce the amount of storage allocated. For more information on allocated storage, see Amazon RDS Storage Types

    Settings

    DB Instance Identifier

    You can rename the DB instance by typing a new name. When you change the DB instance identifier, an instance reboot will occur immediately if you set Apply Immediately to true, or will occur during the next maintenance window if you set Apply Immediately to false. This value is stored as a lowercase string.

    New Master Password

    Type a password for your master user. The password must contain from 8 to 41 alphanumeric characters. By resetting the master password, you also reset permissions for the DB instance. For more information, see Resetting the DB Instance Owner Role Password.

    Network and Security

    Subnet Group

    Choose the subnet group for the DB instance. You can use this setting to move your DB instance to a different VPC. If your DB instance is not in a VPC, you can use this setting to move your DB instance into a VPC. For more information, see Moving a DB Instance Not in a VPC into a VPC.

    Security Groups

    Select the security group you want associated with the DB instance. For more information about security groups, see Working with DB Security Groups.

    Certificate Authority

    Select the certificate you want to use.

    Publicly Accessible

    Choose Yes to give the DB instance a public IP address, meaning that it will be accessible outside the VPC (the DB instance also needs to be in a public subnet in the VPC); otherwise, choose No, so the DB instance will only be accessible from inside the VPC. For more information about hiding DB instances from public access, see Hiding a DB Instance in a VPC from the Internet.

    Database Options

    Parameter Group

    Select the parameter group you want associated with the DB instance. Changing this setting does not result in an outage. The parameter group name itself is changed immediately, but the actual parameter changes are not applied until you reboot the instance without failover. The DB instance will NOT be rebooted automatically and the parameter changes will NOT be applied during the next maintenance window. For more information about parameter groups, see Working with DB Parameter Groups.

    Option Group

    No options are available for PostgreSQL DB instances. For more information about option groups, see Working with Option Groups.

    Copy Tags to Snapshots

    Select this option to have any DB instance tags copied to a DB snapshot when you create a snapshot.

    Database Port

    Specify a new port you want to use to access the database.

    The port value must not match any of the port values specified for options in the option group for the DB instance.

    Your database will restart when you change the database port regardless of whether Apply Immediately is checked.

    Backup

    Backup Retention Period

    Specify the number of days that automatic backups will be retained. To disable automatic backups, set this value to 0.

    Note

    An immediate outage will occur if you change the backup retention period from 0 to a non-zero value or from a non-zero value to 0.

    Backup Window

    Set the time range during which automated backups of your databases will occur. Specify a start time in Universal Coordinated Time (UTC) and a duration in hours.

    Auto Minor Version Upgrade

    If you want your DB instance to receive minor engine version upgrades automatically when they become available, click Yes. Upgrades are installed only during your scheduled maintenance window.

    Maintenance Window

    Set the time range during which system maintenance, including upgrades, will occur. Specify a start time in UTC and a duration in hours.

  5. To apply the changes immediately, select the Apply Immediately check box. Selecting this option can cause an outage in some cases; for more information on the impact of the Apply Immediately option, see Modifying an Amazon RDS DB Instance and Using the Apply Immediately Parameter.

  6. When all the changes are as you want them, click Continue. If you want to cancel any changes, click the X in the upper right corner of the page.

  7. Confirm that the changes you want are listed in the summary screen, and then click Modify DB Instance.

CLI

To modify a PostgreSQL DB instance, use the AWS CLI command modify-db-instance.

The following code modifies mysqldb by setting the backup retention period to 1 week (7 days) and disabling automatic minor version upgrades. These changes are applied during the next maintenance window.

Parameters

  • --db-instance-identifier—the name of the db instance

  • --backup-retention-period—the number of days to retain automatic backups.

  • --no-auto-minor-version-upgrade—disallow automatic minor version upgrades. To allow automatic minor version upgrades, use --auto-minor-version-upgrade.

  • --no-apply-immediately—apply changes during the next maintenance window. To apply changes immediately, use --apply-immediately.

For Linux, OS X, or Unix:

Copy
aws rds modify-db-instance \ --db-instance-identifier mysqldb \ --backup-retention-period 7 \ --no-auto-minor-version-upgrade \ --no-apply-immediately

For Windows:

Copy
aws rds modify-db-instance ^ --db-instance-identifier mysqldb ^ --backup-retention-period 7 ^ --no-auto-minor-version-upgrade ^ --no-apply-immediately

API

To modify a PostgreSQL DB instance, use the ModifyDBInstance action.

Example

The following code modifies mysqldb by setting the backup retention period to 1 week (7 days) and disabling automatic minor version upgrades. These changes are applied during the next maintenance window.

Parameters

  • DBInstanceIdentifier—the name of the db instance

  • BackupRetentionPeriod—the number of days to retain automatic backups.

  • AutoMinorVersionUpgrade=false—disallow automatic minor version upgrades. To allow automatic minor version upgrades, set the value to true.

  • ApplyImmediately=false—apply changes during the next maintenance window. To apply changes immediately, set the value to true.

Copy
https://rds.us-east-1.amazonaws.com/ ?Action=ModifyDBInstance &ApplyImmediately=false &AutoMinorVersionUpgrade=false &BackupRetentionPeriod=7 &DBInstanceIdentifier=mydbinstance &SignatureMethod=HmacSHA256 &SignatureVersion=4 &Version=2013-09-09 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=AKIADQKE4SARGYLE/20131016/us-east-1/rds/aws4_request &X-Amz-Date=20131016T233051Z &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date &X-Amz-Signature=087a8eb41cb1ab0fc9ec1575f23e73757ffc6a1e42d7d2b30b9cc0be988cff97