How to set DBParameterGroup Family property for Postgres 10.6
Asked Answered
P

2

8

I'm using Postgres 10.6 with RDS. I'm trying to setup a DBParameterGroup to set some custom parameters, but I'm not sure what to put for the family name in CloudFormation. The documentation had one example: Family: aurora5.6. I tried Family: postgres10.6 and it did not work. Does anyone have experience with this?

Here's what I have in my CloudFormation RDS stack:

  RDSPostgres:
    Type: 'AWS::RDS::DBInstance'
    DeletionPolicy: Delete
    Properties:
      AllocatedStorage: "100"
      DBInstanceClass: db.m4.large
      DBParameterGroupName: RDSDBParameterGroup
      EnablePerformanceInsights: true
      Engine: "postgres"
      EngineVersion: "10.6"
      MasterUsername: !Ref PGUsername
      MasterUserPassword: !Ref PGPassword
      Port: "5432"
      PubliclyAccessible: true
      StorageType: gp2
      DBSubnetGroupName: !Ref DBSubnetGroup
      VPCSecurityGroups:
        - !GetAtt DatabaseSecurityGroup.GroupId

  RDSDBParameterGroup:
    Type: AWS::RDS::DBParameterGroup
    Properties:
      Description: Postgres custom parameters
      Family: postgres10.6
      Parameters:
        shared_preload_libraries: 'pg_stat_statements'
        pg_stat_statements.max: '10000'
        pg_stat_statements.track: 'all'
        log_min_duration_statement: '1000'
        log_duration: 'on'
        random_page_cost: '1.1'
        checkpoint_completion_target: '0.9'
        min_wal_size: '80'
        effective_io_concurrency: '200'
        log_statement: 'all'

I'm trying to create a new database with these settings and CloudFormation is telling me that postgres10.6 is not a valid parameter. The DBParameterGroup docs don't have examples for postgres, and I have had a hard time finding what this value should be.

Paleobotany answered 23/4, 2019 at 20:7 Comment(0)
M
27

You should set the Family property to postgres10.

Here is the list of available families for PostgreSQL:

enter image description here

You can find the list in the console when creating a Parameter Group. Alternatively you can find the list (with duplicates) using the following AWS CLI command:

aws rds describe-db-engine-versions --query "DBEngineVersions[].DBParameterGroupFamily"
Morita answered 23/4, 2019 at 20:12 Comment(1)
The dropdown in this answer is found in rds console.aws.amazon.com/rds. docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/…Irtysh
V
5

This is because postgres10.6 is not an valid option available in Parameter group family section.
To get the list of all the available parameter group families, use the following AWS CLI command:

aws rds describe-db-engine-versions --query "DBEngineVersions[].DBParameterGroupFamily"

You can also check in AWS console by navigating through Parameter groups in AWS RDS and then in Parameter group family you will be listed with all the available group families in the dropdown menu.

Vampire answered 23/4, 2019 at 21:2 Comment(1)
You can also get this error if you’re trying to update a parameter group family via CDK and CloudFormation. Instead, change the ID of the parameter group, which will do a delete and create instead of an update.Geognosy

© 2022 - 2024 — McMap. All rights reserved.