AWS::RDS::DBParameterGroup
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
resource.
For information about configuring parameters for Amazon RDS DB instances, see Working with parameter groups in the Amazon RDS User Guide.
For information about configuring parameters for Amazon Aurora DB instances, see Working with 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.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::RDS::DBParameterGroup", "Properties" : { "DBParameterGroupName" :
String
, "Description" :String
, "Family" :String
, "Parameters" :Json
, "Tags" :[ Tag, ... ]
} }
YAML
Type: AWS::RDS::DBParameterGroup Properties: DBParameterGroupName:
String
Description:String
Family:String
Parameters:Json
Tags:- Tag
Properties
DBParameterGroupName
-
The name of the DB parameter group.
Constraints:
-
Must be 1 to 255 letters, numbers, or hyphens.
-
First character must be a letter
-
Can't end with a hyphen or contain two consecutive hyphens
If you don't specify a value for
DBParameterGroupName
property, a name is automatically created for the DB parameter group.Note
This value is stored as a lowercase string.
Required: No
Type: String
Pattern:
^[a-zA-Z]{1}(?:-?[a-zA-Z0-9])*$
Update requires: Replacement
-
Description
-
Provides the customer-specified description for this DB parameter group.
Required: Yes
Type: String
Update requires: Replacement
Family
-
The DB parameter group family name. A DB parameter group can be associated with one and only one DB parameter group family, and can be applied only to a DB instance running a DB engine and engine version compatible with that DB parameter group family.
Note
The DB parameter group family can't be changed when updating a DB parameter group.
To list all of the available parameter group families, use the following command:
aws rds describe-db-engine-versions --query "DBEngineVersions[].DBParameterGroupFamily"
The output contains duplicates.
For more information, see
CreateDBParameterGroup
.Required: Yes
Type: String
Update requires: Replacement
Parameters
-
An array of parameter names and values for the parameter update. At least one parameter name and value must be supplied. Subsequent arguments are optional.
RDS for Db2 requires you to bring your own Db2 license. You must enter your IBM customer ID (
rds.ibm_customer_id
) and site number (rds.ibm_site_id
) before starting a Db2 instance.For more information about DB parameters and DB parameter groups for Amazon RDS DB engines, see Working with DB Parameter Groups in the Amazon RDS User Guide.
For more information about DB cluster and DB instance parameters and parameter groups for Amazon Aurora DB engines, see Working with DB Parameter Groups and DB Cluster Parameter Groups in the Amazon Aurora User Guide.
Note
Amazon CloudFormation doesn't support specifying an apply method for each individual parameter. The default apply method for each parameter is used.
Required: No
Type: Json
Update requires: No interruption
-
An optional array of key-value pairs to apply to this DB parameter group.
Note
Currently, this is the only property that supports drift detection.
Required: No
Type: Array of Tag
Maximum:
50
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the name of the DB parameter group.
For more information about using the Ref
function, see Ref
.
Fn::GetAtt
DBParameterGroupName
-
The name of the DB parameter group.
Examples
Create a parameter group for a MySQL DB instance
The following example creates a parameter group for a MySQL DB instance and
sets the sql_mode
, max_allowed_packet
, and innodb_buffer_pool_size
parameters.
JSON
"RDSDBParameterGroup": { "Type": "AWS::RDS::DBParameterGroup", "Properties": { "Description": "CloudFormation Sample MySQL Parameter Group", "Family": "mysql8.0", "Parameters": { "sql_mode": "IGNORE_SPACE", "max_allowed_packet": 1024, "innodb_buffer_pool_size": "{DBInstanceClassMemory*3/4}" } } }
YAML
RDSDBParameterGroup: Type: 'AWS::RDS::DBParameterGroup' Properties: Description: CloudFormation Sample MySQL Parameter Group Family: mysql8.0 Parameters: sql_mode: IGNORE_SPACE max_allowed_packet: 1024 innodb_buffer_pool_size: '{DBInstanceClassMemory*3/4}'