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
109 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,100 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
255 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,100 points
207 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,100 points
33 views
0 votes
1 answer

How to restore a cluster from backup in Amazon Redshift

Amazon Redshift replicates all your data within ...READ MORE

answered Sep 28, 2018 in AWS by Archana
• 3,770 points
113 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,100 points
27 views
0 votes
1 answer
0 votes
1 answer
+1 vote
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.