01 Run describe-clusters command (OSX/Linux/UNIX) to describe the configuration metadata available for the selected EC2-Classic Redshift cluster:
aws redshift describe-clusters
--region us-east-1
--cluster-identifier cc-cluster
02 The command output should return the requested configuration metadata which will be useful later when the cluster will be recreated:
{
"Clusters": [
{
"PubliclyAccessible": true,
"NumberOfNodes": 1,
"MasterUsername": "ccclusteruser",
"DBName": "ccclusterdb",
"ClusterVersion": "1.0",
"Tags": [],
...
"AutomatedSnapshotRetentionPeriod": 1,
"NodeType": "dc1.large",
"Encrypted": false,
"ClusterRevisionNumber": "1022",
"ClusterStatus": "available"
}
]
}
03 Run create-cluster command (OSX/Linux/UNIX) using the existing (EC2-Classic) cluster configuration details returned at the previous step to launch a new Amazon Redshift cluster within a Virtual Private Cloud available in your AWS account:
aws redshift create-cluster
--region us-east-1
--cluster-identifier cc-vpc-cluster
--cluster-type single-node
--node-type dc1.large
--db-name ccclusterdb
--master-username ccclusteruser
--master-user-password DATAclusterpwd5
--vpc-security-group-ids sg-45dca012
--availability-zone us-east-1a
--port 5439
--cluster-subnet-group-name default
--cluster-parameter-group-name default.redshift-1.0
--publicly-accessible
--allow-version-upgrade
04 The command output should return the new cluster configuration metadata:
{
"Cluster": {
"PubliclyAccessible": true,
"MasterUsername": "ccclusteruser",
"VpcSecurityGroups": [
{
"Status": "active",
"VpcSecurityGroupId": "sg-45dca012"
}
],
"NumberOfNodes": 1,
"PendingModifiedValues": {
"MasterUserPassword": "****"
},
"VpcId": "vpc-2fb56548",
"ClusterVersion": "1.0",
"Tags": [],
"AutomatedSnapshotRetentionPeriod": 1,
"ClusterParameterGroups": [
{
"ParameterGroupName": "default.redshift-1.0",
"ParameterApplyStatus": "in-sync"
}
],
"DBName": "ccclusterdb",
"PreferredMaintenanceWindow": "fri:06:00-fri:06:30",
"IamRoles": [],
"AllowVersionUpgrade": true,
"ClusterSubnetGroupName": "default",
"ClusterSecurityGroups": [],
"ClusterIdentifier": "cc-vpc-cluster",
"AvailabilityZone": "us-east-1a",
"NodeType": "dc1.large",
"Encrypted": false,
"ClusterStatus": "creating"
}
}
05 Run again 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-vpc-cluster
--query 'Clusters[*].Endpoint.Address'
06 The command output should return the new cluster endpoint URL:
[
"cc-vpc-cluster.cmfpsgvyjhfo.us-east-1.redshift.amazonaws.com"
]
07 Unload your data from the EC2-Classic Redshift cluster and reload it into the newly created cluster using the Amazon Redshift Unload/Copy utility. With this utility tool you can unload (export) your data from the unencrypted cluster (source) to an AWS S3 bucket, then import it into your new cluster (destination) and clean up the S3 bucket used. The necessary instructions to install, configure and use the Amazon Redshift Unload/Copy tool can be found on this page.
08 As soon as the migration process is completed and all the data is loaded into your new Redshift cluster, you can update your application configuration to refer to the new cluster endpoint address returned at step no. 6.
09 Once the Redshift cluster endpoint is changed within your application configuration, run delete-cluster command (OSX/Linux/UNIX) to remove the EC2-Classic cluster from your AWS account:
aws redshift delete-cluster
--region us-east-1
--cluster-identifier cc-cluster
--final-cluster-snapshot-identifier cc-ec2classic-cluster-finalsnapshot
10 The command output should return the metadata of the cluster selected for deletion:
{
"Cluster": {
"PubliclyAccessible": true,
"MasterUsername": "ccclusteruser",
"DBName": "ccclusterdb",
"NumberOfNodes": 1,
"PendingModifiedValues": {},
"Tags": [],
...
"AutomatedSnapshotRetentionPeriod": 1,
"ClusterIdentifier": "cc-cluster",
"AvailabilityZone": "us-east-1a",
"NodeType": "dc1.large",
"Encrypted": false,
"ClusterStatus": "final-snapshot"
}
}
11 Repeat steps no. 1 - 10 to migrate other Redshift clusters launched with the EC2-Classic platform to a Virtual Private Cloud within the current region.
12 Change the AWS region by updating the --region command parameter value and repeat steps no. 1 - 11 for other regions.