Unable to Create dc2.large Redshift Cluster

Hi Team,

I am trying to create a dc2.large Redshift cluster in the US-EAST-1 and US-WEST-2 regions using the command prompt, but I am encountering the following error:

An error occurred (InvalidParameterValue) when calling the CreateCluster operation: Invalid node type: dc2.large

It seems that this node type is no longer supported in these regions. Could you please advise on the best approach to create a Redshift cluster? For example:

  1. Use a supported node type such as ra3.xlplus
  2. Switch to Redshift Serverless for minimal setup

Looking forward to your guidance.

Thanks & regards,
Vidya

Using the console, I was able to create an ra3.large cluster. The dc2 family sizes were not listed. Please try that size; it may work in the AWS CLI. It appears our playground allows that size, as well.

I tried ra3.large cluster on playground, but it seems its deleted automatically.

Sure , I will try using ra3.large cluster.

Thank You
Vidya

Hi @rob_kodekloud ,

Any update on redshift cluster size, as dc2.large is not supported and If I will use ra3.large then it showing policy violation and deleting the cluster immediately.

Regards
Vidya

As I pointed out before, when I tried in the console, it actually did work. So, to answer a question with a question or two:

  • did you try to with the AWS CLI to use the ra3.large setting instead?
  • if you did, and you got an error, what was the error exactly?

Hi @rob_kodekloud ,

I have tried with ra3.large using terraform. Its created without any error, but immediately deleted within 2-3 seconds.

Regards
Vidya

So I can replicate what you’re seeing (and so I can demonstrate this to our engineers), Please include the terraform script you’re using here. I need it in valid text, so I can try it as well and include it in the internal system. Please put the code in a code block (three backticks on one line, your code, and three backticks on a separate line after – details here). This will help you get the support you want; not being able to replicate your problem is preventing me from giving you a better answer.

Please find the below code. I am pasting code below as I am not allowed to attach file.

Code —

terraform {
required_providers {
aws = {
source = “hashicorp/aws”
version = “~> 6.0”
}
random = {
source = “hashicorp/random”
version = “~> 3.0”
}
}
required_version = “>= 1.4”
}

provider “aws” {
region = var.aws_region
}

Random password for Redshift master user

resource “random_password” “redshift_password” {
length = 16
special = true
}

VPC + Subnet group (minimal)

resource “aws_vpc” “main” {
cidr_block = “10.0.0.0/16”
}

resource “aws_subnet” “main” {
vpc_id = aws_vpc.main.id
cidr_block = “10.0.1.0/24”
availability_zone = “us-east-1a”
}

resource “aws_internet_gateway” “gw” {
vpc_id = aws_vpc.main.id
}

resource “aws_security_group” “redshift_sg” {
name = “redshift-sg”
description = “Allow Redshift access”
vpc_id = aws_vpc.main.id

ingress {
from_port = 5439
to_port = 5439
protocol = “tcp”
cidr_blocks = [“0.0.0.0/0”]
}

egress {
from_port = 0
to_port = 0
protocol = “-1”
cidr_blocks = [“0.0.0.0/0”]
}
}

resource “aws_redshift_subnet_group” “redshift_subnet” {
name = “redshift-subnet”
subnet_ids = [aws_subnet.main.id]
}

-----------------------

Redshift Cluster

-----------------------

resource “aws_redshift_cluster” “example” {
cluster_identifier = “example-redshift-cluster”
database_name = “exampledb”
master_username = “masteruser”
master_password = “Abc1234567890abcf” #random_password.redshift_password.result
node_type = “ra3.large”
cluster_type = “single-node”
skip_final_snapshot = true

vpc_security_group_ids = [aws_security_group.redshift_sg.id]
cluster_subnet_group_name = aws_redshift_subnet_group.redshift_subnet.name
}

output “redshift_endpoint” {
value = aws_redshift_cluster.example.endpoint
}

output “redshift_password” {
value = random_password.redshift_password.result
sensitive = true
}

Please USE A CODE BLOCK. Pasting without that corrupts your code and makes it very difficult or impossible to use it. SO USE A CODE BLOCK. Reference the link for instructions if you don’t know how to do that.

Hi @rob_kodekloud , Please share the reference link so that I can share the full code.

You can:

  1. Use a code block (really, it’s not hard). Details here.
  2. OR: use github to upload your code and leave a link.

What you don’t want to do is just paste the code in directlly, because it will be garbled to garbage by Discord. So don’t do that :slight_smile: