CLOUD CONCEPT

Data Retention

Data retention is the practice of defining and enforcing how long data is kept, how it remains usable, and when it can be deleted.

Cloud Concepts Hub →

What is Data Retention

Retention policies balance business needs, recovery requirements, legal obligations, privacy, and storage cost. In the cloud, engineers implement them through lifecycle rules, backup schedules, retention periods, deletion controls, and exceptions such as legal holds.

Data retention answers three practical questions: which data must be kept, how long it must be kept, and what happens when that period ends. A policy should identify the data owner, the reason for retention, the event that starts the retention clock, and any exceptions. For example, operational logs might be retained for 90 days, while financial records might need several years of retention under applicable requirements. These periods are organizational decisions, not universal cloud defaults.

Retention has both minimum and maximum boundaries. A minimum period prevents premature destruction of required evidence or recovery data. A maximum period limits unnecessary storage, privacy exposure, and the impact of a security incident. Keeping everything forever is not automatically safer: it increases cost and can conflict with data minimization or deletion obligations. Legal holds can suspend normal disposal, so deletion workflows must account for them.

Cloud lifecycle policies automate actions based on conditions such as object age, tags, or access patterns. Moving data to a cheaper storage tier changes its storage characteristics, not necessarily its retention period. For example, an application could retain logs in readily accessible storage initially, transition older logs to archival storage, and expire them after the approved retention period. Engineers must consider retrieval latency, retrieval charges, minimum storage duration charges, and transition eligibility before choosing tiers.

Amazon S3 Lifecycle can transition objects between supported storage classes and expire objects. In a versioned bucket, expiration of a current object generally creates a delete marker rather than permanently removing its previous versions. Noncurrent-version expiration requires separate configuration. Rules must therefore address the relevant versions and copies; hiding an object from normal reads does not prove that its data has been deleted.

Retention enforcement differs from automated cleanup. S3 Object Lock protects individual object versions using retention periods or legal holds. Governance mode permits authorized bypass, whereas compliance mode prevents deletion or shortening of the retention period even by the account root user during that period. A legal hold has no automatic expiration and remains until removed by an authorized principal. Object Lock requires versioning, and lifecycle expiration cannot permanently delete a protected version while its protection remains active.

Backups have their own retention requirements. AWS Backup provides centralized scheduling and retention management for supported resources, helping preserve recovery points after production data changes or is deleted. Backup frequency determines how much recent work might be lost; backup retention determines how far back recovery can reach. Neither a successful backup job nor a long retention period proves that restoration will meet operational requirements, so recovery testing remains necessary. AWS Backup Vault Lock can enforce retention constraints and protect recovery points against premature deletion, depending on its configuration and mode.

File storage illustrates another important distinction. Amazon EFS Lifecycle management moves eligible files among storage classes according to access patterns; it does not provide age-based automatic file deletion. Amazon FSx for Lustre supports automatic backup scheduling and retention for supported persistent file systems, while scratch file systems do not support backups. File disposal and backup expiration therefore require separate design decisions.

A complete implementation covers production data, replicas, exports, object versions, and recovery points. Retained encrypted data also requires usable encryption keys and appropriate access permissions throughout the retention period. Monitor policy changes, failed backups, and deletion outcomes, and document how exceptions are approved. For exam questions, distinguish tiering for cost, expiration for disposal, backups for recovery, and immutable retention for protection against deletion.

Key aspects of Data Retention

Effective retention combines explicit time limits, automated lifecycle actions, protected preservation, recoverable backups, and verified handling of every relevant copy.

Purpose-based retention periods

Assign retention periods by data category, business purpose, and applicable obligations. Define the event that starts the clock, such as creation, transaction completion, or account closure.

Automated lifecycle actions

Use supported lifecycle rules to transition or expire data without relying on manual cleanup. Verify whether a rule changes storage class, deletes data, or only affects its current version.

Enforced preservation and legal holds

Use immutable retention controls when data must survive accidental or malicious deletion. Treat legal holds as exceptions to normal disposal and tightly control permissions to remove or bypass protection.

Independent backup retention

Specify backup frequency and recovery-point retention separately from production-data retention. Test restoration and confirm that retained backups meet recovery objectives.

Coverage of versions and copies

Account for noncurrent versions, replicas, exports, and backups when implementing retention and deletion requirements. Removing a production record does not automatically remove every retained copy.

Cost, accessibility, and evidence

Balance lower storage cost against retrieval latency and charges while preserving required access and encryption keys. Monitor enforcement and keep evidence of policy changes, backup results, and disposal outcomes.

Cloud services for Data Retention

These services implement complementary parts of a retention design. Amazon S3 handles object tiering and expiration, while Object Lock preserves protected versions against deletion. AWS Backup manages recovery-point schedules and retention across supported resources, with Vault Lock available for stronger deletion protection. Amazon EFS Lifecycle management reduces the cost of retaining less frequently accessed files without deleting them. Supported persistent Amazon FSx for Lustre file systems provide scheduled backups with defined retention. Engineers must coordinate these controls so that live data, object versions, and backups follow approved policies without confusing cheaper storage with disposal or immutability with recoverability.

Amazon Simple Storage Service image Amazon S3

S3 Lifecycle automates supported storage-class transitions and expiration, including separately configured handling of noncurrent versions. S3 Object Lock adds version-level retention and legal holds when deletion must be prevented.

Open Amazon S3 →
AWS Backup image AWS Backup

AWS Backup centralizes backup schedules and recovery-point retention for supported resources. Backup Vault Lock can enforce retention constraints and protect backups from premature deletion; its governance and compliance modes provide different bypass protections.

Open AWS Backup →