How to Create a Redshift Cluster on AWS (Amazon Web Services)

How to Create a Redshift Cluster on AWS (Amazon Web Services)

Amazon Redshift is a fully managed data warehouse solution offered by Amazon Web Services, designed to handle data analysis on a petabyte scale.

Creating a Redshift Cluster on AWS

To set up your Redshift cluster on AWS, log in to your account and follow these steps:

1) Choose Your Region. In the top right corner of the menu, you can select the region for your database. AWS regions determine the data center location and the hourly pricing, which varies by region. For example, creating a database in São Paulo is significantly more expensive than in Virginia, though it offers lower latency. Since this article focuses on analytical databases (Data Warehouses and Data Lakes), a few microseconds of latency are acceptable, so we'll use the US East 1 (N. Virginia) region.

Setting Up Supporting Services

Before creating the Redshift cluster itself, we’ll need to set up additional AWS services: a security group, elastic IP, and a cluster subnet group.

Creating a Security Group

AWS security groups allow you to control access to your resources at a granular level. We’ll use them to securely enable external applications to access your cluster.

2) In the top search bar, type “security groups” and, under “Features,” select “Security groups (VPC feature).”

photo  2.webp

 

3) Click “Create security group” on the right.

photo 3.png

4) In the basic details section, give your security group a name (an internal AWS identifier), such as “sg,” provide a description (also for internal AWS use), and select the VPC for this security group — if your account is new, there will likely be only one VPC.

photo 4.webp

5) Go to the “Inbound rules” section, click “Add rule,” and set up the access rule for your security group.

photo 5.webp

6) To set up the access group details, we’ll use Redshift’s default port (5439) for this tutorial. Under “Type,” select “Redshift” and specify an IP under “Source.” Click “Add rule” again to add multiple IPs.

photo 6.webp

 

7) All of Kondado's IPs are listed here, and they all need to be added to the security group for access. You should also include any other IPs (such as your own or from a visualization tool) that you want to be able to access your cluster.

photo 7.webp

8) Once all IPs are added, scroll down and click “Create security group.”

photo 8.webp

 

Creating an Elastic IP

Elastic IPs allow you to keep a fixed external access address for certain AWS resources, such as EC2 instances and Redshift. This way, changes to the cluster configuration won’t impact how external applications connect to it.

9) To create an Elastic IP that can later be used with Redshift, search for “elastic ip” in the top bar and select “Elastic IP addresses (VPC feature)” under “Features.”

photo 9.webp

 

10) Click on “Allocate Elastic IP address.”

photo 10.png

11) Keep the default settings and click “Allocate” at the end.

photo 11.webp

12) You will be redirected to the list of Elastic IPs, showing the IP you just created. In this case, the address is 54.235.128.213.

photo 12.webp

 

Cluster Subnet Group

13) This resource is created directly on the Redshift page. In the top search bar, type “Redshift” and then select the service.

photo 13.webp

14) Open the left sidebar, click on “Configurations,” and then choose “Subnet groups.”

photo 14.2 (1).jpg

 

15) Click “Create cluster subnet group.”

photo 15.webp

16) On the creation page, give your cluster subnet group a name, like “kondado-cluster-subnet-group,” and add a description for internal reference.

photo 16.webp

17) Choose the VPC you’ll use and either add specific subnets from this VPC or click “Add all the subnets for this VPC” to include them all.

photo 15-17.webp

18) Finally, click “Create cluster subnet group.”

photo 16.webp

19) You’ll see your new cluster subnet group created.

photo 17.webp

 

Now, Creating the Redshift Cluster

20) Now that the security group, elastic IP, and subnet group are set up, we can proceed to create the Redshift cluster. Go to the main Redshift page by searching for it in the top bar as described in step 13.

21) On the main Redshift screen, select “Create cluster” under “Provision and manage clusters.”

photo 21.webp

22) On the creation screen, in the first section, give your cluster a name, like “redshift-kondado” (this is just an internal AWS identifier), and select “Production” as the intended use for the cluster.

photo 20.webp

23) In the same section, for cluster sizing, choose the “I’ll choose” option and configure the cluster size. For this example, we’ll go with the most cost-effective setup: “Node type” = “dc2.large” and “Number of nodes” = 1.

P23.png

24) Go to the “Database configurations” section, enter a name for the admin user of the database, such as “kondado,” and then choose a password for this user — make sure to write down this password, as you’ll need it later.

photo 23.webp

25) Skip to the “Additional configurations” section and uncheck the “Use defaults” option.

photo 24.png

26) In the “Network and security” section, select the VPC you used to create the previous resources.

P26.png

27) Under “VPC security groups,” deselect the existing options and find and select the security group you created in step 8 (in our example, “sg”).

P27A.webp

VPC Security Groups Option

P27B.png

Select the security group created in step 8

28) In the “Cluster subnet group” field, choose the one created in step 19 (in our example, “kondado-cluster-subnet-group”).

photo 28.png

29) At the end of the “Network and security” section, look for the “Publicly accessible” option and select “Turn on.” Then, choose the Elastic IP address created in step 12 (in our example, 54.235.128.213). This setup is crucial to allow external applications, like Kondado servers, to access your cluster. Remember, the security group rules from step 8 will protect against unauthorized access.

photo 29.png

30) In the “Database configurations” section, specify the “Database name” as you like (e.g., “kondado”), and keep the “Database port” set to 5439, which matches the security group configuration.

photo 30.png

 

31) Click “Create cluster” to set up your Redshift data warehouse.

photo 29.png

 

Adding Your New Redshift Cluster as a Destination in Kondado

 For instructions on how to add your new Redshift cluster as a destination in the Kondado platform,  click here

These are the parameters you’ll need to fill out in Kondado, as used in this tutorial:

  • Address: 54.235.128.213
  • Port: 5439
  • Database: kondado
  • User: kondado
  • Password: 🔒
  • Schema: public