# 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 concept. Updated 2026-10-29. Page: https://blowstack.com/tools/cloud-concepts-hub/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.

Practice exams covering Data Retention: [AIF-C01 AWS Certified AI Practitioner](https://blowstack.com/practice-exams/aws-certified-ai-practitioner), [CLF-C02 AWS Certified Cloud Practitioner](https://blowstack.com/practice-exams/aws-certified-cloud-practitioner), [DEA-C01 AWS Certified Data Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate), [DVA-C02 AWS Certified Developer - Associate](https://blowstack.com/practice-exams/aws-certified-developer-associate), [DOP-C02 AWS Certified DevOps Engineer - Professional](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional), [AIP-C01 AWS Certified Generative AI Developer - Professional](https://blowstack.com/practice-exams/aws-certified-generative-ai-developer-professional), [SCS-C03 AWS Certified Security - Specialty](https://blowstack.com/practice-exams/aws-certified-security-specialty), [SAA-C03 AWS Certified Solutions Architect - Associate](https://blowstack.com/practice-exams/aws-certified-solutions-architect-associate), [SAP-C03 AWS Certified Solutions Architect - Professional](https://blowstack.com/practice-exams/aws-certified-solutions-architect-professional).

## 6 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.

1. **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.
2. **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.
3. **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.
4. **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.
5. **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.
6. **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 S3](https://blowstack.com/tools/cloud-services-hub/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.
- **[AWS Backup](https://blowstack.com/tools/cloud-services-hub/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.

## Data Retention exam questions

Real practice exam questions on Data Retention, with the correct answer and its explanation.

### Question 1 (AIF-C01)

**Question:**

A company stores large AI model evaluation reports in a nonversioned Amazon S3 bucket. Its governance policy requires the reports to remain available for two years and then become eligible for automatic deletion. Auditors must be able to retrieve any report immediately throughout the retention period, although reports are rarely accessed after the first month. No legal holds apply. Which solution meets these requirements while reducing storage costs for older reports?

**Correct answer:** Use S3 Lifecycle to transition reports to S3 Standard-IA after one month and expire them after two years.

**Explanation:** S3 Standard-IA provides immediate access for infrequently accessed reports at a lower storage cost than S3 Standard. The lifecycle expiration action separately makes reports eligible for automatic deletion after the approved retention period.

### Question 2 (DEA-C01)

**Question:**

A company stores temporary analytics results in an Amazon S3 bucket that has never had versioning enabled. An enabled S3 Lifecycle rule expires objects in the results/ prefix 30 days after creation.

The company changes its retention policy: results must remain available for 90 days after creation and then become eligible for automatic deletion. All existing results are less than 20 days old. An administrator adds a bucket policy that explicitly denies s3:DeleteObject to all principals for results/*, expecting this policy to prevent premature Lifecycle deletion. No Object Lock protections or other deletion processes apply.

Which change must a data engineer make to meet the revised retention policy with the least operational overhead?

**Correct answer:** Change the existing Lifecycle rule's expiration age from 30 days to 90 days.

**Explanation:** Updating the expiration action makes existing and future matching objects eligible for automatic deletion after 90 days from creation. All existing objects are younger than the original expiration threshold. The bucket policy's explicit deny does not block S3 Lifecycle expiration.

### Question 3 (SAP-C03)

**Question:**

A healthcare software company stores application recovery packages in an existing Amazon S3 general purpose bucket that has never had S3 Versioning enabled. The application replaces each package by issuing a PUT request to the same object key. Changing the bucket name, object keys, or upload behavior would require a lengthy application release.

Beginning at a planned cutover, every successfully uploaded package must remain recoverable for at least 60 days after its upload, even if ransomware subsequently uploads corrupted content to the same key. No identity, including the AWS account root user, may permanently delete a protected package or shorten its established retention. Operators must be able to make a retained package the current package again without changing the key used by readers. Packages that exist before cutover do not require retention protection.

Which solution meets these requirements?

**Correct answer:** Enable S3 Versioning and S3 Object Lock on the existing bucket before cutover. Configure default 60-day compliance-mode retention, and ensure uploads cannot specify shorter retention. Keep versioning enabled. Recover a package by copying its retained version to the same key, creating a new current version.

**Explanation:** Object Lock can be enabled on an existing general purpose bucket and requires Versioning. Compliance-mode retention prevents permanent deletion or shortening of an established retention period, including by the root user. Protection applies to individual versions: a PUT to the same key creates another version without modifying the retained version. Copying a retained version back to the same key creates a new current version. After Object Lock is enabled, it cannot be disabled and versioning cannot be suspended.

### Question 4 (CLF-C02)

**Question:**

A company needs a daily backup of its production storage volumes. Each backup must remain available for 90 days and then be automatically deleted to avoid unnecessary storage costs. The company wants to manage this requirement centrally without custom scripts. Which approach meets these requirements?

**Correct answer:** Create an AWS Backup plan with a daily backup schedule and a lifecycle rule that expires recovery points after 90 days.

**Explanation:** An AWS Backup plan can centrally automate daily backups and specify a retention period. Configuring recovery points to expire after 90 days meets both the availability and automatic deletion requirements.

### Question 5 (DVA-C02)

**Question:**

A developer maintains an application that uses multipart uploads to store large media files under the media/ prefix in a versioned Amazon S3 bucket. Some clients disconnect before completing their uploads, causing storage charges for uploaded parts to accumulate. Successful uploads always finish within 24 hours. All completed objects and their versions must be retained until the application explicitly deletes them. Which solution will automatically clean up uploads that remain incomplete for at least 7 days with the LEAST operational overhead?

**Correct answer:** Configure an S3 Lifecycle rule for the media/ prefix with AbortIncompleteMultipartUpload and DaysAfterInitiation set to 7.

**Explanation:** This action automatically aborts multipart uploads that have not completed within the specified number of days and removes their uploaded parts. It does not delete completed objects or their versions, and it requires no custom cleanup process.

### Question 6 (AIP-C01)

**Question:**

A financial services company stores sensitive prompts and responses from a foundation model application in an Amazon S3 bucket. S3 Cross-Region Replication copies the objects to a disaster recovery bucket. Both buckets have versioning enabled, and each log object has a unique key that is never overwritten.

The source bucket has an S3 Lifecycle rule that expires current objects after 7 days. Both buckets already have appropriate rules to permanently remove noncurrent versions and clean up expired object delete markers. However, an audit finds that current log objects in the disaster recovery bucket remain readable indefinitely.

The privacy policy requires source objects to remain eligible for expiration after 7 days and replica objects to become eligible for expiration 30 days after their original creation time. Standard asynchronous lifecycle processing is acceptable. Replicas must remain available for disaster recovery until their 30-day expiration eligibility date.

Which change meets these requirements with the LEAST operational overhead?

**Correct answer:** Add an S3 Lifecycle rule to the disaster recovery bucket that expires current log objects after 30 days. Keep the existing source expiration and version-cleanup rules.

**Explanation:** Lifecycle configurations are independent for each bucket, and source lifecycle expiration actions are not replicated. A destination lifecycle rule must expire the replica objects. For replicas, lifecycle age is based on the object's original creation time, not when replication completed. The existing noncurrent-version and delete-marker cleanup rules handle subsequent cleanup.

### Question 7 (SAA-C03)

**Question:**

A company stores daily audit extracts from its production database in Amazon S3. Each extract uses a unique object key and must remain unaltered for at least 365 days, even if an administrator or the AWS account root user attempts to delete it. Extracts associated with an active investigation must remain protected until the investigation ends, which can take longer than 365 days. To avoid unnecessary storage costs, eligible extracts must be deleted automatically after their retention requirements end. Asynchronous deletion is acceptable.

Which solution meets these requirements with the LEAST operational overhead?

**Correct answer:** Enable S3 Object Lock with a default 365-day compliance-mode retention period. Apply legal holds to extracts under investigation and remove the holds when investigations end. Configure S3 Lifecycle rules to expire current versions after 365 days, expire noncurrent versions after 1 day, and remove expired object delete markers.

**Explanation:** Compliance mode prevents deletion of protected object versions during the retention period, including by the root user. Legal holds independently protect investigated extracts until explicitly removed. Lifecycle rules automate cleanup of eligible current and noncurrent versions and delete markers. Object Lock prevents permanent deletion while a retention period or legal hold still applies.

### Question 8 (SCS-C03)

**Question:**

An incident response team stores original system and application log archives in a versioned Amazon S3 evidence bucket. Each object version has a 90-day S3 Object Lock compliance-mode retention period. Lifecycle rules expire current objects and permanently delete eligible noncurrent versions after the approved retention period.

Legal counsel identifies specific object version IDs that must be preserved for litigation. Their retention periods expire tomorrow, but the litigation has no known end date. Unrelated evidence must continue through normal disposal. After counsel authorizes release, the selected versions must become eligible for normal disposal without an additional fixed retention period. Automated cleanup roles can delete object versions but cannot change Object Lock retention settings or legal holds.

Which action meets these requirements?

**Correct answer:** Apply an S3 Object Lock legal hold to each identified object version. Leave the lifecycle rules unchanged, and remove the holds only after counsel authorizes release.

**Explanation:** A legal hold protects an individual object version from permanent deletion without requiring an expiration date. Lifecycle processing and cleanup roles cannot permanently delete held versions. Unrelated versions remain subject to normal disposal. Once the holds are removed and the original retention periods have expired, the selected versions become eligible for normal disposal.

### Question 9 (DOP-C02)

**Question:**

A company publishes multi-architecture application images to a private Amazon ECR repository. Each release consists of a manifest list tagged release-<id> and two untagged platform-specific image manifests referenced by that list. All three manifests are pushed on the same day. No other tags or artifacts exist in the repository.

The repository has a lifecycle policy that expires untagged images more than 7 days after they are pushed. However, platform-specific images from releases pushed several months ago remain in the repository because their tagged manifest lists still exist.

The company must retain every release for at least 90 days after it is pushed, then automatically remove its manifest list and reclaim storage for platform-specific images that are no longer referenced by any retained manifest list. The solution must use native ECR lifecycle management without a custom cleanup process.

Which change should a DevOps engineer make?

**Correct answer:** Keep the untagged-image rule and add a rule that selects tagged images with the release- prefix and expires them more than 90 days after they are pushed.

**Explanation:** ECR cannot expire an image that is referenced by a manifest list until the referencing manifest list is deleted. The new rule expires release manifest lists after 90 days. The existing untagged-image rule can then expire eligible platform-specific images once no remaining manifest list references them. Lifecycle processing is asynchronous, so removal need not occur in a single evaluation.

## Practice Data Retention in a full exam

Questions on Data Retention in each practice exam, with every answer option and an explanation for each:

- [SAA-C03](https://blowstack.com/practice-exams/aws-certified-solutions-architect-associate): 31 questions
- [DEA-C01](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate): 20 questions
- [AIF-C01](https://blowstack.com/practice-exams/aws-certified-ai-practitioner): 15 questions
- [SAP-C03](https://blowstack.com/practice-exams/aws-certified-solutions-architect-professional): 11 questions
- [SCS-C03](https://blowstack.com/practice-exams/aws-certified-security-specialty): 10 questions
- [DOP-C02](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional): 6 questions
- [CLF-C02](https://blowstack.com/practice-exams/aws-certified-cloud-practitioner): 4 questions
- [AIP-C01](https://blowstack.com/practice-exams/aws-certified-generative-ai-developer-professional): 4 questions
- [DVA-C02](https://blowstack.com/practice-exams/aws-certified-developer-associate): 3 questions

## What is Data Retention

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.

## Learn Data Retention in lessons

19 short lessons on Data Retention in 8 certification courses.

- AIF-C01: Data Retention: retention policies (Premium), https://app.blowstack.com/lessons/data-retention-retention-policies-aif-c01
- DEA-C01: Data Retention: policy-driven expiration (Premium), https://app.blowstack.com/lessons/data-retention-policy-driven-expiration-dea-c01
- SAP-C03: Data Retention: cost-optimized backup lifecycles (Premium), https://app.blowstack.com/lessons/data-retention-cost-optimized-backup-lifecycles-sap-c03
- CLF-C02: Data Retention: retention periods and expiration (Premium), https://app.blowstack.com/lessons/data-retention-retention-periods-and-expiration-clf-c02
- AIP-C01: Data Retention: lifecycle expiration for sensitive AI data (Premium), https://app.blowstack.com/lessons/data-retention-lifecycle-expiration-for-sensitive-ai-data-aip-c01
- SAA-C03: Data Retention: lifecycle expiration (Premium), https://app.blowstack.com/lessons/data-retention-lifecycle-expiration-saa-c03
