-
Notifications
You must be signed in to change notification settings - Fork 61
Description
Name of the resource
AWS::Redshift::Cluster
Resource name
No response
Description
Summary
Request to add FinalClusterSnapshotIdentifier
and SkipFinalClusterSnapshot
properties to the AWS::Redshift::Cluster
CloudFormation resource to enable automatic final snapshot creation when clusters are deleted via CloudFormation stack deletion.
Use Case
Currently, when a Redshift cluster is deleted through CloudFormation stack deletion, there's no way to automatically create a final snapshot. This forces users to either:
- Manually delete the cluster via CLI/Console with snapshot options before deleting the stack
- Risk data loss if the stack is accidentally deleted
- Use workarounds like Lambda functions in custom resources
Proposed Solution
Add the following properties to AWS::Redshift::Cluster
:
FinalClusterSnapshotIdentifier: String
SkipFinalClusterSnapshot: Boolean
These properties already exist in the Redshift API (delete-cluster
operation) but are missing from the CloudFormation resource.
Example Usage
rRedshiftCluster:
Type: AWS::Redshift::Cluster
Properties:
# ... existing properties
FinalClusterSnapshotIdentifier: !Sub "${ClusterName}-final-snapshot"
SkipFinalClusterSnapshot: false
Benefits
- Prevents accidental data loss during stack deletion
- Aligns CloudFormation capabilities with native Redshift API
- Eliminates need for complex workarounds
- Improves infrastructure-as-code best practices
Current Workaround
Currently using manual cluster deletion or custom Lambda resources, which adds complexity and potential for human error.
CLI Command (works but requires manual intervention)
aws redshift delete-cluster \
--cluster-identifier my-cluster \
--final-cluster-snapshot-identifier my-cluster-final-snapshot
AWS Service
Amazon Redshift / AWS CloudFormation
Resource Type
AWS::Redshift::Cluster
Other Details
No response