Skip to content

Terraform Redshift Cluster Can't create node type with dc2.large

0

I'm trying to use the following in my Terraform code.

resource "aws_redshift_cluster" "this" {
  master_username    = "username"
  master_password    = "password"
  cluster_identifier = "redshift-cluster-id"
  node_type          = "dc2.large"
  cluster_type       = "single-node"
  encrypted          = true
  multi_az           = false
  ...  
  skip_final_snapshot       = true
}

However, I'm getting an error saying that the dc2.large type cannot be used.

 api error InvalidParameterValue: Invalid node type: dc2.large

But when creating a Redshift cluster through the AWS console, I can create it with this type.

Has there been a change in the AWS CLI ? Or is this type no longer available for use ?

asked a year ago2.6K views

3 Answers
1
Accepted Answer

The issue you're experiencing with creating a dc2.large node type in Redshift is due to Amazon's planned end-of-life for DC2 nodes. Here are the key points you need to know:

  1. DC2 Node Type Status:
  • DC2 nodes will reach end-of-life on April 24, 2026
  • After May 15, 2025, you won't be able to:
    • Create new DC2 clusters
    • Resize existing ones
    • Add nodes to current DC2 clusters
  1. Recommended Alternative:

Instead of dc2.large, AWS recommends upgrading to either:

  • Amazon Redshift RA3 nodes
  • Amazon Redshift Serverless
  1. Solution for Your Terraform Code:

You should modify your Terraform configuration to use RA3 node types. Here's an example modification:

resource "aws_redshift_cluster" "this" {
  master_username    = "username"
  master_password    = "password"
  cluster_identifier = "redshift-cluster-id"
  node_type         = "ra3.xlplus"  # Replace dc2.large with ra3.xlplus
  cluster_type      = "single-node"
  encrypted         = true
  multi_az          = false
  ...  
  skip_final_snapshot = true
}
  1. Benefits of Upgrading:
  • Independent compute and storage scaling
  • Data sharing capabilities
  • Write operations for concurrency scaling
  • Zero-ETL capabilities
  • Multi-AZ capabilities

Sources:

  1. Official AWS Documentation: https://docs.aws.amazon.com/redshift/latest/mgmt/managing-cluster-considerations.html
  2. AWS Redshift RA3 Features: https://aws.amazon.com/redshift/features/ra3/
  3. Redshift Serverless Documentation: https://docs.aws.amazon.com/redshift/latest/mgmt/serverless-migration.html

For additional assistance with the migration process or specific questions about RA3 configurations, you can refer to the AWS documentation links provided above.

AWS
EXPERT

answered a year ago

AWS
SUPPORT ENGINEER

reviewed a year ago

  • Thank you so much for your answer! I was able to save a lot of time! I've made the final decision to use the ra3.large type.

1

It appears that there might be some confusion regarding the available node types for Amazon Redshift clusters. While dc2.large was previously a valid node type, AWS has been phasing out older instance types in favor of newer, more efficient options.

The error you're encountering suggests that dc2.large may no longer be available for new cluster creations via the AWS CLI or Terraform, even though it might still appear as an option in the AWS console. This discrepancy can occur during transition periods when AWS is updating their services.

For current Redshift clusters, the recommended node types are typically from the RA3 family. You might want to consider using one of these instead:

  • ra3.xlplus
  • ra3.4xlarge
  • ra3.16xlarge

For example, you could modify your Terraform code to use:

resource "aws_redshift_cluster" "this" {
master_username    = "username"
master_password    = "password"
cluster_identifier = "redshift-cluster-id"
node_type          = "ra3.xlplus"
cluster_type       = "single-node"
encrypted          = true
multi_az           = false
...  
skip_final_snapshot       = true
}

If you specifically need a smaller instance type, you might want to check the most recent AWS documentation or contact AWS support for the latest available options. The available node types can change over time as AWS introduces new instance families and retires older ones.

Remember to always use strong, unique passwords for your master_password and consider using AWS Secrets Manager or similar services to manage sensitive information securely, rather than hardcoding them in your Terraform files.
Sources
Manage Amazon Redshift provisioned clusters with Terraform | AWS Big Data Blog
create-cluster — AWS CLI 2.27.31 Command Reference

answered a year ago

0

The above answers are both correct, dc2.large is being deprecated. The only single node types are ra3.large and ra3.xlplus.

https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-clusters.html

AWS

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.