When deleting an RDS instance using AWS CLI, the following error is encountered: An error occurred (InvalidParameterCombination) when calling the DeleteDBInstance operation: FinalDBSnapshotIdentifier cannot be specified when deleting a cluster instance. How can you resolve it?
Click on the arrows to vote for the correct answer
A. B. C. D.Answer: D.
Option A is incorrect because this error is not given when deletion protection is enabled.
Option B is incorrect because you do not specify S3 bucket ARN for the final snapshot.
Option C is incorrect because this error is not given if there is insufficient storage capacity.
Option D is CORRECT because the error warns that a cluster-level snapshot wasn't taken before the delete command.
One way to resolve the issue is to use the -skip-final-snapshot flag.
Reference:
https://aws.amazon.com/premiumsupport/knowledge-center/rds-error-delete-aurora-cluster/When deleting an RDS instance using AWS CLI, you may encounter an error message that says "An error occurred (InvalidParameterCombination) when calling the DeleteDBInstance operation: FinalDBSnapshotIdentifier cannot be specified when deleting a cluster instance." This error occurs because you are trying to specify a FinalDBSnapshotIdentifier for a cluster instance, which is not allowed.
To resolve this error, you need to take the following steps:
Option A: Deletion protection is enabled. Use aws rds modify-db-instance command with --no-deletion-protection flag.
If deletion protection is enabled for the RDS instance, you need to disable it before you can delete the instance. You can do this by using the aws rds modify-db-instance command with the --no-deletion-protection flag.
For example:
cssaws rds modify-db-instance --db-instance-identifier mydbinstance --no-deletion-protection
This command will modify the RDS instance with the specified identifier and disable deletion protection.
Option B: In the CLI delete command, Specify the S3 bucket ARN where the final database snapshot must be stored.
If you want to create a final database snapshot before deleting the instance and store it in an S3 bucket, you need to specify the S3 bucket ARN in the delete command.
For example:
cppaws rds delete-db-instance --db-instance-identifier mydbinstance --final-db-snapshot-identifier mydbsnapshot --no-skip-final-snapshot --s3-bucket-arn arn:aws:s3:::mybucket
This command will delete the RDS instance with the specified identifier, create a final database snapshot with the specified identifier, and store it in the specified S3 bucket.
Option C: There is not enough allocated storage for the final database snapshot. Use the aws rds modify-db-instance command to allocate additional storage for the snapshot.
If there is not enough storage allocated for the final database snapshot, you need to modify the RDS instance and allocate additional storage. You can do this by using the aws rds modify-db-instance command.
For example:
cssaws rds modify-db-instance --db-instance-identifier mydbinstance --allocated-storage 100
This command will modify the RDS instance with the specified identifier and allocate 100 GB of storage.
Option D: A cluster-level snapshot wasn't taken before deleting the database. Use the --skip-final-snapshot flag in the CLI delete command to skip the final snapshot.
If you don't want to create a final database snapshot before deleting the instance, you need to use the --skip-final-snapshot flag in the delete command.
For example:
cppaws rds delete-db-instance --db-instance-identifier mydbinstance --no-skip-final-snapshot
This command will delete the RDS instance with the specified identifier without creating a final database snapshot.