aws / aws/aws-cdk

(backups): Backup vault cannot be deleted because it contains recovery points

Open
#33,711 1 comment 0 reactions 0 assignees View on GitHub
@aws-cdk/aws-backup effort/medium feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the feature

Provide a `force_delete` option to destroy all recovery points in an AWS Backup Vault.

Terraform has a feature for [this](https://github.com/hashicorp/terraform-provider-aws/issues/13247) for a few years.

This would resolve

```json
{
"errorCode": "InvalidRequestException",
"errorMessage": "Backup vault cannot be deleted because it contains recovery points.",
"requestParameters": {
"backupVaultName": ""
}
}
```

### Use Case

Similar to s3 `delete_objects` to delete all bucket objects when a bucket is deleted, the same should be provided for AWS Backup Vaults (especially when working in ephemeral environments).

Currently, you need to manually [delete recovery points](https://docs.aws.amazon.com/aws-backup/latest/devguide/create-a-vault.html)

### Proposed Solution

Use a custom resource to delete all recovery points before the Backup Vault is deleted.

### Other Information

_No response_

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### CDK version used

2.180.0

### Environment details (OS name and version, etc.)

Mac

Contributor guide

Open the contributing guide

Research direction

The issue does not name files or tests. Start by locating the AWS Backup Vault construct and its deletion behavior, then review the AWS Backup APIs for listing and deleting recovery points. Done means a force_delete option removes the vault's recovery points before deletion without changing default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.