Back to controls

Ensure databases have deletion protection enabled

### Overview

Category

Controls

Medium

Applies to

Alibaba CloudAWSGoogle CloudMicrosoft Azure

Coverage

4 queries

Asset types

10 covered

Overview

Overview

Cyscale looks for managed databases that can be accidentally deleted and lead to potential data loss. Deletion protection prevents any existing database instance from being removed by users.

Remediation guidance

Depending on the provider and the service you use, check out the following resources``'

AWS

From the Console

Perform the following actions to enable database deletion protection:

  1. Open the security settings using the "Open in AWS" menu option
  2. Select Modify
  3. Navigate to Additional configuration, Deletion protection
  4. Check the box Enable deletion protection
  5. Click Continue and Modify DB Instance

From the AWS CLI

aws rds modify-db-instance --db-instance-identifier <dbInstanceIdentifier> --deletion-protection

Default Value

By default, deletion protection is turned on for a database created using the AWS Console.

References

  1. Modifying an Amazon RDS DB instance
  2. Deleting a DB instance

Azure

Google Cloud

Alibaba

Service-wide remediation

Recommended when many resources are affected: fix the platform baseline first so new resources inherit the secure setting, then remediate the existing flagged resources in batches.

Azure

Use management group or subscription Azure Policy assignments, remediation tasks where supported, landing-zone standards, and IaC modules so drift is prevented at scale.

Google Cloud

Use organization or folder policies where available, shared project templates, logs and alerting baselines, and IaC modules so new resources inherit the secure setting.

AWS

Use AWS Organizations guardrails, AWS Config rules or conformance packs where they fit, approved account baselines, and IaC modules so new resources inherit the secure setting.

Alibaba Cloud

Use Resource Directory guardrails, account baselines, and IaC modules so the secure setting is applied consistently across environments.

Operational rollout

  1. Fix the baseline first at the account, subscription, project, cluster, or tenant scope that owns this control.
  2. Remediate the currently affected resources in batches, starting with internet-exposed and production assets.
  3. Re-scan and track approved exceptions with an owner and expiry date.

Query logic

These are the stored checks tied to this control.

Databases without delete protection Azure

Connectors

Microsoft Azure

Covered asset types

CosmosDBAccountMariaDBServerMySQLFlexibleServerMySQLServerPostgreSQLFlexibleServerPostgreSQLServerSQLDatabaseSQLServer

Expected check: eq []

{ databases(where: { deletionPrevention: "disabled" }) {...AssetFragment} } 
Databases without delete protection Google Cloud Cloud SQL

Connectors

Google Cloud

Covered asset types

CloudSQLInstance

Expected check: eq []

{ cloudSqlInstances (where: {deletionPrevention: "disabled"}) {...AssetFragment} }
Databases without delete protection aws and alibaba

Connectors

AWS

Covered asset types

DBInstance

Expected check: eq []

{ dbInstances(where: { AND: [ {deletionPrevention: "disabled" } {OR: [{ dbCluster: null }{ dbCluster: { deletionProtection: false }}]}]}) {...AssetFragment} }
Databases without delete protection aws and alibaba

Connectors

Alibaba Cloud

Covered asset types

DBInstance

Expected check: eq []

{ dbInstances(where: { AND: [ {deletionPrevention: "disabled" } {OR: [{ dbCluster: null }{ dbCluster: { deletionProtection: false }}]}]}) {...AssetFragment} }
Cyscale Logo
Cyscale is an agentless cloud-native application protection platform (CNAPP) that automates the contextual analysis of cloud misconfigurations, vulnerabilities, access, and data, to provide an accurate and actionable assessment of risk.

Stay connected

Receive new blog posts and product updates from Cyscale

By clicking Subscribe, I agree to Cyscale’s Privacy Policy


© 2026 Cyscale Limited

LinkedIn icon
Twitter icon
Facebook icon
crunch base icon
angel icon