Skip to content
GitHubXDiscordRSS

ClusterParameterGroup

Learn how to create, update, and manage AWS Redshift ClusterParameterGroups using Alchemy Cloud Control.

The ClusterParameterGroup resource allows you to manage AWS Redshift ClusterParameterGroups which are used to manage database-level parameters and settings for your Amazon Redshift clusters.

Create a basic ClusterParameterGroup with required properties and some common optional parameters.

import AWS from "alchemy/aws/control";
const basicClusterParameterGroup = await AWS.Redshift.ClusterParameterGroup("basicClusterParamGroup", {
Description: "Basic parameter group for Redshift clusters",
ParameterGroupFamily: "redshift-1.0",
ParameterGroupName: "basic-parameter-group",
Parameters: [{
ParameterName: "enable_user_activity_logging",
ParameterValue: "true"
}]
});

Configure a ClusterParameterGroup with more advanced settings, including multiple parameters.

const advancedClusterParameterGroup = await AWS.Redshift.ClusterParameterGroup("advancedClusterParamGroup", {
Description: "Advanced parameter group for Redshift clusters",
ParameterGroupFamily: "redshift-1.0",
ParameterGroupName: "advanced-parameter-group",
Parameters: [
{
ParameterName: "query_group",
ParameterValue: "analytics"
},
{
ParameterName: "max_connections",
ParameterValue: "500"
},
{
ParameterName: "enable_user_activity_logging",
ParameterValue: "true"
}
]
});

Create a ClusterParameterGroup with tags for better resource management and organization.

const taggedClusterParameterGroup = await AWS.Redshift.ClusterParameterGroup("taggedClusterParamGroup", {
Description: "Parameter group with tags for resource management",
ParameterGroupFamily: "redshift-1.0",
ParameterGroupName: "tagged-parameter-group",
Tags: [
{
Key: "Environment",
Value: "Production"
},
{
Key: "Department",
Value: "Data Science"
}
]
});

If you want to adopt an existing parameter group instead of failing when it already exists, you can set the adopt property.

const adoptedClusterParameterGroup = await AWS.Redshift.ClusterParameterGroup("adoptedClusterParamGroup", {
Description: "Adopting an existing parameter group if it exists",
ParameterGroupFamily: "redshift-1.0",
ParameterGroupName: "existing-parameter-group",
adopt: true
});