2 Answers
- Newest
- Most votes
- Most comments
1
-
Create a New Unencrypted Cluster:
- First, create a new temporary Amazon Redshift cluster with the same configuration (such as node type, region, etc.) as your original cluster. This cluster should be unencrypted.
- Ensure that the cluster is in the same region as the snapshot you want to restore.
aws redshift create-cluster \ --cluster-identifier temp-cluster \ --node-type dc2.large \ --master-username masteruser \ --master-user-password masterpassword \ --db-name mydb \ --no-encrypted -
Restore the Snapshot to the Unencrypted Cluster:
- Once the temporary unencrypted cluster is set up, you can restore the unencrypted snapshot to this new cluster.
aws redshift restore-from-cluster-snapshot \ --cluster-identifier temp-cluster \ --snapshot-identifier your-unencrypted-snapshot-id -
Create an Encrypted Snapshot:
- After successfully restoring the snapshot to the temporary unencrypted cluster, you can now create an encrypted snapshot of that cluster.
aws redshift create-snapshot \ --snapshot-identifier temp-cluster-encrypted-snapshot \ --cluster-identifier temp-cluster \ --encrypted -
Create a New Encrypted Cluster from the Encrypted Snapshot:
- Once you have the encrypted snapshot, create a new encrypted cluster from this snapshot.
aws redshift restore-from-cluster-snapshot \ --cluster-identifier new-encrypted-cluster \ --snapshot-identifier temp-cluster-encrypted-snapshot \ --encrypted -
Delete the Temporary Unencrypted Cluster:
- After the new encrypted cluster is up and running, you can delete the temporary unencrypted cluster to avoid any additional costs.
aws redshift delete-cluster \ --cluster-identifier temp-cluster \ --skip-final-snapshot
0
Thank you @Hikaru Nguyen. WORKED. Just a note: I can't restore snapshot to existed cluster (step 1) (my snapshot is Automatically), so i just ignore step 1 and start from 2 -> WORKED.
I think it's so confusing when we just use simple command and able restore while on AWS Redshift Console, if i choose restore it will show error:* Cannot restore an unencrypted snapshot to an encrypted Cluster*. AWS should fix it to keep Encrypted is default based on snapshot.
Relevant content
- asked a year ago
- asked 3 years ago
- AWS OFFICIALUpdated 4 years ago
