01 Run describe-clusters command (OSX/Linux/UNIX) to describe the configuration information of the Amazon Redshift cluster that you want to upgrade (see Audit section part II to identify the right cluster):
aws redshift describe-clusters
--region us-east-1
--cluster-identifier cc-cluster
02 The command output should return the requested configuration information which will be useful later when the new Redshift cluster will be created:
{
"Clusters": [
{
"PubliclyAccessible": true,
"MasterUsername": "ccclusterusr",
"VpcSecurityGroups": [
{
"Status": "active",
"VpcSecurityGroupId": "sg-061e2e7c"
}
],
"ClusterPublicKey": "ssh-rsa AAAAB3NzaC ... ",
"NumberOfNodes": 1,
"PendingModifiedValues": {},
"VpcId": "vpc-2fb56548",
"ClusterVersion": "1.0",
"Tags": [],
"AutomatedSnapshotRetentionPeriod": 1,
"ClusterParameterGroups": [
{
"ParameterGroupName": "default.redshift-1.0",
"ParameterApplyStatus": "in-sync"
}
],
"DBName": "ccclusterdb",
"PreferredMaintenanceWindow": "fri:03:00-fri:03:30",
"Endpoint": {
"Port": 5439,
"Address": "cc-cluster.cmfpsgvyjhfo ... "
},
"IamRoles": [],
"AllowVersionUpgrade": true,
"ClusterCreateTime": "2015-01-11T16:38:21.654Z",
"ClusterSubnetGroupName": "default",
"ClusterSecurityGroups": [],
"ClusterIdentifier": "cc-cluster",
"ClusterNodes": [
{
"NodeRole": "SHARED",
"PrivateIPAddress": "172.31.23.5",
"PublicIPAddress": "52.3.149.186"
}
],
"AvailabilityZone": "us-east-1b",
"NodeType": "ds1.xlarge",
"Encrypted": false,
"ClusterRevisionNumber": "1106",
"ClusterStatus": "available"
}
]
}
03 Run create-cluster-snapshot command (OSX/Linux/UNIX) to create a manual snapshot of the existing Redshift cluster:
aws redshift create-cluster-snapshot
--region us-east-1
--cluster-identifier cc-cluster
--snapshot-identifier cc-cluster-manual-snapshot
04 The command output should return the snapshot configuration metadata:
{
"Snapshot": {
"EstimatedSecondsToCompletion": -1,
"OwnerAccount": "123456789012",
"CurrentBackupRateInMegaBytesPerSecond": 0.0,
"ActualIncrementalBackupSizeInMegaBytes": -1.0,
"NumberOfNodes": 1,
"Status": "creating",
"VpcId": "vpc-2fb56548",
"ClusterVersion": "1.0",
"Tags": [],
"MasterUsername": "ccclusterusr",
"TotalBackupSizeInMegaBytes": -1.0,
"DBName": "ccclusterdb",
"BackupProgressInMegaBytes": 0.0,
"ClusterCreateTime": "2015-01-11T16:38:21.654Z",
"EncryptedWithHSM": false,
"ClusterIdentifier": "cc-cluster",
"SnapshotCreateTime": "2016-10-17T18:15:49.041Z",
"AvailabilityZone": "us-east-1b",
"NodeType": "ds1.xlarge",
"Encrypted": false,
"ElapsedTimeInSeconds": 0,
"SnapshotType": "manual",
"Port": 5439,
"SnapshotIdentifier": "cc-cluster-manual-snapshot"
}
}
05 Run restore-from-cluster-snapshot command (OSX/Linux/UNIX) to create a new AWS Redshift cluster from the snapshot created at step no. 3, using the configuration information returned at step no. 2 and the current generation node type name:
aws redshift restore-from-cluster-snapshot
--region us-east-1
--cluster-identifier cc-cluster-upgraded
--snapshot-identifier cc-cluster-manual-snapshot
--node-type ds2.xlarge
--vpc-security-group-ids sg-061e2e7c
--cluster-subnet-group-name default
--availability-zone us-east-1b
--cluster-parameter-group-name default.redshift-1.0
--publicly-accessible
06 The command output should return the metadata of the new (upgraded) Redshift cluster:
{
"Cluster": {
"IamRoles": [],
"ClusterVersion": "1.0",
"NumberOfNodes": 1,
"VpcId": "vpc-2fb56548",
"NodeType": "ds2.xlarge",
"PubliclyAccessible": true,
"Tags": [],
"MasterUsername": "ccclusterusr",
"ClusterParameterGroups": [
{
"ParameterGroupName": "default.redshift-1.0",
"ParameterApplyStatus": "in-sync"
}
],
"Encrypted": false,
"ClusterSecurityGroups": [],
"AllowVersionUpgrade": true,
"VpcSecurityGroups": [
{
"Status": "active",
"VpcSecurityGroupId": "sg-061e2e7c"
}
],
"AvailabilityZone": "us-east-1b",
"ClusterSubnetGroupName": "default",
"AutomatedSnapshotRetentionPeriod": 1,
"ClusterStatus": "creating",
"ClusterIdentifier": "cc-cluster-upgraded",
"DBName": "ccclusterdb",
"PreferredMaintenanceWindow": "fri:03:00-fri:03:30",
"PendingModifiedValues": {}
}
}
07 Run describe-clusters command (OSX/Linux/UNIX) using the appropriate query filters to expose the new Redshift cluster endpoint:
aws redshift describe-clusters
--region us-east-1
--cluster-identifier cc-cluster-upgraded
--query 'Clusters[*].Endpoint.Address'
08 The command output should return the new cluster endpoint URL:
[
"cc-cluster-upgraded.cmfpsgvyjhfo.us-east-1.redshift.amazonaws.com"
]
09 As soon as the build process is complete, update your application configuration to point to the AWS Redshift cluster endpoint address returned at step no. 8.
10 Once the Redshift cluster endpoint is changed within your application configuration, run delete-cluster command (OSX/Linux/UNIX) to remove the previous generation node type based cluster from your AWS account:
aws redshift delete-cluster
--region us-east-1
--cluster-identifier cc-cluster
--final-cluster-snapshot-identifier cc-cluster-finalsnapshot
11 The command output should return the metadata of the cluster selected for deletion:
{
"Cluster": {
"PubliclyAccessible": true,
"MasterUsername": "ccclusteruser",
"VpcSecurityGroups": [
{
"Status": "active",
"VpcSecurityGroupId": "sg-061e2e7c"
}
],
"NumberOfNodes": 1,
"PendingModifiedValues": {},
"VpcId": "vpc-2fb56548",
"ClusterVersion": "1.0",
"Tags": [],
"AutomatedSnapshotRetentionPeriod": 1,
"ClusterParameterGroups": [
{
"ParameterGroupName": "default.redshift-1.0",
"ParameterApplyStatus": "in-sync"
}
],
"DBName": "ccclusterdb",
"PreferredMaintenanceWindow": "sun:06:00-sun:06:30",
"Endpoint": {
"Port": 5439,
"Address": "cc-cluster.cmfpsgvyjhfo.us-east-1 ... "
},
"IamRoles": [],
"AllowVersionUpgrade": true,
"ClusterCreateTime": "2015-01-11T16:38:21.654Z",
"ClusterSubnetGroupName": "default",
"ClusterSecurityGroups": [],
"ClusterIdentifier": "cc-cluster",
"AvailabilityZone": "us-east-1b",
"NodeType": "ds1.xlarge",
"Encrypted": false,
"ClusterStatus": "final-snapshot"
}
}
12 Repeat steps no. 1 - 11 for each Redshift cluster that requires the node type upgrade, available in the current region.
13 Change the AWS region by updating the --region command parameter value and repeat steps no. 1 - 12 to perform the entire process for other regions.