

 Amazon Redshift will no longer support the creation of new Python UDFs starting Patch 198. Existing Python UDFs will continue to function until June 30, 2026. For more information, see the [ blog post ](https://amazonaws-china.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/). 

# Setting up Multi-AZ when creating a new cluster
<a name="create-cluster-multi-az"></a>

Amazon Redshift Multi-AZ supports two Availability Zones at a time. Amazon Redshift automatically selects the Availability Zones based on the selected subnet group configuration. You can convert an existing single Availability Zone data warehouse into a Multi-AZ data warehouse or restore from a snapshot to configure it into a Multi-AZ data warehouse.

Using the Amazon Redshift console, you can easily create new Multi-AZ deployments. To create a new Multi-AZ deployment using the Amazon Redshift console, select the Multi-AZ option when creating the data warehouse. Specify the number of compute nodes required in a single Availability Zone, and Amazon Redshift will deploy that number of nodes in each of two Availability Zones. All nodes will be used to read and write workload processing during normal operation. You can also use the Amazon CLI `create-cluster` command to create a new Multi-AZ data warehouse using the `multi-az` parameter.

You can convert an existing Single-AZ data warehouse into a Multi-AZ data warehouse, you can use either the Amazon Redshift console or the Amazon CLI `modify-cluster` command using the `multi-az` parameter. Or, you can restore from a snapshot to configure a Single-AZ data warehouse into a Multi-AZ data warehouse either using the Amazon Redshift console or the Amazon CLI `restore-from-cluster-snapshot` command using the `multi-az` parameter.

Multi-AZ deployment only supports RA3 node types that use Amazon Redshift Managed Storage (RMS). Amazon Redshift stores data in RMS, which uses Amazon S3 and is accessible in all Availability Zones in an Amazon Web Services Region, without having to replicate the data at the Amazon Redshift level. 

You can set up Multi-AZ deployment when creating a new cluster either using the Amazon Redshift console or the Amazon Command Line Interface.

## Using the console
<a name="maz-create-console"></a>

1. Sign in to the Amazon Web Services Management Console and open the Amazon Redshift console at [https://console.amazonaws.cn/redshiftv2/](https://console.amazonaws.cn/redshiftv2/).

1. On the navigation menu, choose **Provisioned clusters dashboard**, and choose **Clusters**. The clusters for your account in the current Amazon Web Services Region are listed. A subset of properties of each cluster is displayed in columns in the list.

1.  Choose the button **Create cluster** to open the create cluster page.

1. Enter properties for your cluster. For general information about creating clusters, see [Creating a cluster](create-cluster.md).

1. Choose one of the RA3 node types from the **Node type** drop-down list. The AZ configuration option becomes available only when you chose an RA3 node type.

1. Under **AZ configuration**, choose **Multi-AZ**.

1. Under **Number of nodes per AZ**, enter at least two nodes for your cluster.

1. You have the option to load sample data or bring your own data:
   + In **Sample data**, choose **Load sample data** to load the sample dataset into your Amazon Redshift cluster. Amazon Redshift loads the sample dataset Tickit into the default dev database and public schema. Amazon Redshift automatically loads the sample dataset into your Amazon Redshift cluster. You can start using the query editor v2 to query data.
   + To bring your own data to your Amazon Redshift cluster, follow the steps in [Bringing your own data to Amazon Redshift](https://docs.amazonaws.cn/redshift/latest/gsg/bring-own-data.html).

1. Scroll down to **Additional configurations**, expand **Network and security**, and make sure that you either accept the default **Cluster subnet group** or choose another one. If you choose another cluster subnet group, make sure that there are 3 Availability Zones in the subnet group you selected.

1. Under **Additional configurations**, expand **Database configurations**.

1. To use a custom Amazon KMS key instead of the default Amazon-owned key, click **Customize encryption settings** under **Database encryption**.

1. Under **Choose an KMS key**, you can either choose an Amazon Key Management Service key or enter an ARN. Or, you can click **Create an Amazon Key Management Service key** in the Amazon Key Management Service console. For more information about creating KMS keys, see [Creating Keys](https://docs.amazonaws.cn/kms/latest/developerguide/create-keys.html) in the *Amazon Key Management Service Developer Guide*.

1. Click **Create cluster**. When the cluster creation succeeds, you can view the details in the cluster details page. You can use your SQL client to load and query data.

## Using the Amazon Command Line Interface
<a name="maz-create-cli"></a>

**To set up Multi-AZ when creating a cluster using the Amazon Command Line Interface**
+ From the Amazon CLI use the `create-cluster` command and the `multi-az` parameter as follows.

  ```
  aws redshift create-cluster 
      --port 5439 
      --master-username master
      --master-user-password #####
      --node-type ra3.4xlarge
      --number-of-nodes 2
      --profile maz-test
      --endpoint-url https://redshift.eu-west-1.amazonaws.com
      --region eu-west-1
      --cluster-identifier test-maz
      --multi-az 
      --maintenance-track-name CURRENT
      --encrypted
  ```