AWS Amazon RDS Parameter Group

This page shows how to write Terraform and CloudFormation for Amazon RDS Parameter Group and write them securely.

aws_db_parameter_group (Terraform)

The Parameter Group in Amazon RDS can be configured in Terraform with the resource name aws_db_parameter_group. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Provides an RDS DB parameter group resource .Documentation of the available parameters for various RDS engines can be found at:

Tips: Best Practices for The Other AWS Amazon RDS Resources

In addition to the aws_db_instance, AWS Amazon RDS has the other resources that should be configured for security reasons. Please check some examples of those resources and precautions.

risk-label

aws_db_instance

Ensure backup retension of your RDS instance is specified

It's better to set it explicitly to reduce the risk of availability issues.

risk-label

aws_rds_cluster

Ensure backup retension of your RDS cluster is specified

It's better to set it explicitly to reduce the risk of availability issues.

risk-label

aws_rds_cluster_instance

Ensure your RDS cluster instance blocks unwanted access

It's better to limit accessibily to the minimum that is required for the application to work.

Review your AWS Amazon RDS settings

In addition to the above, there are other security points you should be aware of making sure that your .tf files are protected in Shisho Cloud.

AWS::RDS::DBParameterGroup (CloudFormation)

The DBParameterGroup in RDS can be configured in CloudFormation with the resource name AWS::RDS::DBParameterGroup. The following sections describe 10 examples of how to use the resource and its parameters.

Example Usage from GitHub

AuroraRDSInstanceParameter.yml#L1
Type: AWS::RDS::DBParameterGroup
Properties:
  Description: Parameter group for the Serverless Aurora RDS DB.
  Family: aurora5.6
  Parameters:
    sql_mode: IGNORE_SPACE
AuroraRDSInstanceParameter.yml#L1
Type: AWS::RDS::DBParameterGroup
Properties:
  Description: Parameter group for the Serverless Aurora RDS DB.
  Family: aurora5.6
  Parameters:
    sql_mode: IGNORE_SPACE
AuroraRDSInstanceParameter.yml#L1
Type: AWS::RDS::DBParameterGroup
Properties:
  Description: Parameter group for the Serverless Aurora RDS DB.
  Family: aurora5.6
  Parameters:
    sql_mode: IGNORE_SPACE
AuroraRDSInstanceParameter.yml#L1
Type: AWS::RDS::DBParameterGroup
Properties:
  Description: Parameter group for the Serverless Aurora RDS DB.
  Family: aurora5.6
  Parameters:
    sql_mode: IGNORE_SPACE
AuroraRDSInstanceParameter.yml#L1
Type: AWS::RDS::DBParameterGroup
Properties:
  Description: Parameter group for the Serverless Aurora RDS DB.
  Family: aurora5.6
  Parameters:
    sql_mode: IGNORE_SPACE
resourceCondition.json#L56
        "Type": "AWS::RDS::DBParameterGroup",
        "Properties" : {
          "Family" : "MySQL5.5",
          "Description" : "CloudFormation Sample Database Parameter Group",
            "Parameters" : {
              "autocommit" : "1" ,
rdsparamsgroup.json#L4
  "Type" : "AWS::RDS::DBParameterGroup",
  "Properties" : {
    "Description" : "{{settings["description"]}}",
    "Family" : "{{settings["family"]}}",
    "Parameters" : {
    {% for k, v in settings["parameters"].iteritems() %}
positive7.json#L37
      "Type": "AWS::RDS::DBParameterGroup",
      "Properties": {
        "Family": "MySQL5.5",
        "Description": "CloudFormation Sample Database Parameter Group",
        "Parameters": {
          "general_log": "1",
cloudformation-list-stack-resources.aurora.json#L30
            "ResourceType": "AWS::RDS::DBParameterGroup",
            "ResourceStatus": "UPDATE_COMPLETE"
        },
        {
            "PhysicalResourceId": "auroraSubnetGroup",
            "ResourceType": "AWS::RDS::DBSubnetGroup",
DB-Param-Standalone.json#L15
            "Type": "AWS::RDS::DBParameterGroup"
        }
    }
}

Parameters

Explanation in CloudFormation Registry

The AWS::RDS::DBParameterGroup resource creates a custom parameter group for an RDS database family.

This type can be declared in a template and referenced in the DBParameterGroupName property of an [AWS::RDS::DBInstance](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html) resource.

For information about configuring parameters for Amazon RDS DB instances, see Working with DB parameter groups in the Amazon RDS User Guide.

For information about configuring parameters for Amazon Aurora DB instances, see Working with DB parameter groups and DB cluster parameter groups in the Amazon Aurora User Guide.

Note Applying a parameter group to a DB instance may require the DB instance to reboot, resulting in a database outage for the duration of the reboot.

Frequently asked questions

What is AWS Amazon RDS Parameter Group?

AWS Amazon RDS Parameter Group is a resource for Amazon RDS of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Amazon RDS Parameter Group?

For CloudFormation, the gilyas/serverless-examples, Teslenk0/lambda-examples and mfolivas/aws-node-graphql-and-rds source code examples are useful. See the CloudFormation Example section for further details.