How to create a Redshift Cluster using boto3

0 votes
Can someone help me with the code to create a RedShift Cluster using Python boto3? Thank you in advance.
Feb 25, 2019 in AWS by Suresh
2,721 views

1 answer to this question.

0 votes

Here is the code to create a Redshift Cluster using Python boto3 library.

import boto3
obj = boto3.resource('redshift')
obj.create_cluster(
    cluster_identifier='redshiftdemo',
    node_type='dc2.large',
    master_username='priyaj',
    master_user_password='password123',
    db_name='dev',
    cluster_type='single-node',
    cluster_security_groups='Priyaj SG',
    vpc_security_group_ids='Priyaj SG',
    cluster_subnet_group_name='priyajclustersubnet',
    availability_zone='us-east-1a',
    preferred_maintenance_window='None',
    cluster_parameter_group_name='None',
    automated_snapshot_retention_period='None',
    port=5439,
    cluster_version='None',
    allow_version_upgrade='None',
    number_of_nodes=1,
    publicly_accessible='None',
    encrypted='None')

Hope this helps.

answered Feb 25, 2019 by Priyaj
• 58,090 points
Thanks for the instructions. But How can view the cluster on AWS UI ?

You can follow these below steps.

  1. sign in to the AWS Management Console and open the Amazon Redshift console at https://console.aws.amazon.com/redshift/.

  2. On the navigation menu, choose CLUSTERS. The clusters for your account in the current AWS Region are listed. A subset of properties of each cluster is displayed in columns in the list. If you don't have any clusters, choose Create cluster to create one.

  3. Choose the cluster name in the list to view more details about a cluster.

Related Questions In AWS

0 votes
1 answer

How to create a RedShift Cluster using command line?

Hi@akhtar, To create a cluster in Virtual Private ...READ MORE

answered Nov 26, 2020 in AWS by MD
• 95,440 points
739 views
0 votes
1 answer

How to create subnets in a vpc using boto3?

Here is the simple way of implementing ...READ MORE

answered Dec 5, 2018 in AWS by Shuvodip Ghosh
4,062 views
0 votes
1 answer

How to create EMR cluster using Python boto3?

The python boto3 code for creating a ...READ MORE

answered Feb 27, 2019 in AWS by Priyaj
• 58,090 points
8,882 views
0 votes
1 answer

How to create a EMR Cluster using Java AWS SDK?

The Java code for creating an EMR ...READ MORE

answered Feb 27, 2019 in AWS by Priyaj
• 58,090 points
1,262 views
+1 vote
1 answer

How to create a redshift cluster?

You can create a Redshift Cluster using ...READ MORE

answered Feb 25, 2019 in AWS by Priyaj
• 58,090 points
694 views
0 votes
1 answer
0 votes
1 answer

How to create a redshift cluster using AWS CLI?

You can create your cluster using AWS ...READ MORE

answered Feb 25, 2019 in AWS by Priyaj
• 58,090 points
1,028 views
+1 vote
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP