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 in AWS by Suresh
435 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 by Priyaj
• 56,940 points

Related Questions In AWS

0 votes
1 answer

How to create subnets in a vpc using boto3?

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

answered Dec 4, 2018 in AWS by Shuvodip Ghosh
629 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 in AWS by Priyaj
• 56,940 points
1,184 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 in AWS by Priyaj
• 56,940 points
168 views
+1 vote
1 answer

How to create a redshift cluster?

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

answered Feb 25 in AWS by Priyaj
• 56,940 points
56 views
0 votes
1 answer
0 votes
1 answer
+1 vote
1 answer