The lifecycle of data
DEA-C01 · Lesson 12 of 23 · 1:33:54
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the DEA-C01 exam (AWS Certified Data Engineer – Associate). In this lesson: S3 storage classes from S3 Standard to Glacier Deep Archive, S3 Intelligent-Tiering, lifecycle rules that transition and expire objects and noncurrent versions, S3 Versioning, DynamoDB TTL, S3 Object Lock and legal holds, deletion requests that reach every copy, and resilience with replication, AWS Backup, point-in-time recovery, and Multi-AZ deployments. Includes three original practice questions.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
Kept forever
AnyCompany Games keeps every game log in S3 Standard forever, even logs that nobody has opened in three years, and the storage bill grows every month. Meanwhile, finished matches pile up in DynamoDB, a file deleted last week could not be recovered, and the legal team asks for seven years of payment records that nobody can change. This lesson covers storage classes and lifecycle rules, expiring and deleting data, legal requirements, and resiliency.
Storage classes and lifecycle
S3 storage classes trade access speed for price: S3 Standard for frequent access, Standard-IA and One Zone-IA for infrequent access, and the S3 Glacier classes for archives. Glacier Instant Retrieval still returns data in milliseconds, while Glacier Flexible Retrieval and Glacier Deep Archive keep data archived, so you restore it before you can open it. The infrequent access and Glacier classes have a minimum storage duration and retrieval fees, so they fit data that stays put and is rarely opened. An S3 Lifecycle configuration automates the moves: transition actions move objects to another class after a number of days, like Standard-IA after thirty days, and Glacier Flexible Retrieval after one year. And when access patterns are unknown, S3 Intelligent-Tiering moves each object between access tiers by itself, with no retrieval fees, for a small monitoring fee.
Expiring and deleting
Expiration actions delete objects when they reach an age, like logs after two years, and S3 deletes them for you. With versioning on, a delete only adds a delete marker, and older versions stay as noncurrent versions, so you can recover a file deleted by mistake. So add a noncurrent version expiration to the lifecycle rule, or old versions will be kept, and paid for, forever. In DynamoDB, Time to Live, or TTL, deletes each item after the expiration timestamp stored in one of its attributes, typically within a few days, without consuming write throughput. Because expired items can stay visible for a few days, queries should filter them out by the timestamp.
Legal requirements
Some data must not change, and some must disappear: both are legal requirements. S3 Object Lock stores objects as write once, read many, on a bucket with versioning, with a retention period or a legal hold on each object version. In compliance mode, no user, not even the root user, can overwrite or delete a protected version until its retention ends, while governance mode lets users with special permissions change the settings or delete. A legal hold has no end date: it protects a version until someone removes the hold, for example during a lawsuit. And when the law or a player asks for data to be deleted, delete it everywhere: the DynamoDB items, the rows in Iceberg tables, and the older object versions, not only the current ones.
Resiliency
Resiliency means that data survives failures and mistakes, and stays available. S3 replication copies new objects automatically and asynchronously to another bucket, in another Region with Cross-Region Replication, or in the same Region with Same-Region Replication, and both buckets need versioning. AWS Backup centralizes the backups of many services, like DynamoDB, RDS, Aurora, EFS, and S3, with backup plans, copies to other Regions, and a Vault Lock that prevents anyone from deleting the backups. DynamoDB point-in-time recovery restores a table to any second of the last thirty-five days, and global tables replicate it across Regions. And RDS keeps automated backups for a retention period that you choose, while Multi-AZ keeps a standby in another Availability Zone.
Lifecycle at AnyCompany Games
Here is the plan at AnyCompany Games: game logs move to Standard-IA after thirty days, to Glacier Deep Archive after a year, and expire after five years. Finished matches in DynamoDB carry a TTL attribute, set to ninety days after the match. Payment records go to a versioned bucket with Object Lock in compliance mode for seven years, replicated to a second Region. And AWS Backup protects the databases with daily backups, copies in another Region, and a Vault Lock.
Recap
Let's recap. Storage classes trade access speed for price, from S3 Standard to Glacier Deep Archive, and Intelligent-Tiering moves objects by itself. Lifecycle rules transition objects and expire them, noncurrent versions included. Versioning keeps deleted objects recoverable, and DynamoDB TTL deletes expired items without consuming write capacity. Object Lock and legal holds keep records unchanged, and deletion requests reach every copy. And replication, AWS Backup, point-in-time recovery, and Multi-AZ keep data resilient and available.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
Chat logs in S3 are opened often during their first month, rarely after that, and must be deleted after two years. What should the data engineer configure?
- S3 Object Lock in compliance mode for two full years
- A DynamoDB TTL attribute on each log object
- Cross-Region Replication to a second bucket in Europe
- Lifecycle: Standard-IA at 30 days, expire at 2 years
Show the answer
Lifecycle: Standard-IA at 30 days, expire at 2 years
The transition moves the logs to Standard-IA once they are rarely opened, and the expiration deletes them after two years. “S3 Object Lock in compliance mode for two full years” would prevent the deletion instead of doing it. “A DynamoDB TTL attribute on each log object” is for items in DynamoDB tables, not for objects in S3. And “Cross-Region Replication to a second bucket in Europe” would copy the logs and double the storage, without moving or deleting anything.
An engineer deleted a folder of match results in S3 by mistake, and nothing could be recovered. The team wants deleted objects to be recoverable, and old versions removed after 90 days. What should the data engineer configure?
- Versioning, with a noncurrent version expiration
- A lifecycle rule that expires objects after 90 days
- S3 Intelligent-Tiering on the whole bucket
- DynamoDB TTL on a table that lists the files
Show the answer
Versioning, with a noncurrent version expiration
With versioning, a delete adds a delete marker and keeps the old version, and the noncurrent expiration removes old versions after ninety days. “A lifecycle rule that expires objects after 90 days” would delete current objects too, which nobody asked for. “S3 Intelligent-Tiering on the whole bucket” would lower storage costs, without keeping deleted objects. And “DynamoDB TTL on a table that lists the files” would expire items in a table, not recover files.
The legal team requires payment records to stay unchanged for seven years, and nobody, not even an administrator with full permissions, may delete them. What should the data engineer configure?
- Object Lock in governance mode for seven years
- Versioning, with a lifecycle rule at seven years
- Object Lock in compliance mode for seven years
- A bucket policy that denies deletes to analysts
Show the answer
Object Lock in compliance mode for seven years
In compliance mode, no user, including the root user, can overwrite or delete a protected version before its retention ends. “Object Lock in governance mode for seven years” would let users with special permissions bypass the lock. “Versioning, with a lifecycle rule at seven years” would keep old versions, but anyone with permissions could still delete them. And “A bucket policy that denies deletes to analysts” would block some users, but an administrator could change the policy.