0Pricing
AWS Security Academy · Lesson

Data Lifecycle and Secure Deletion

Age out, archive, and remove data on a controlled schedule.

Data Lifecycle and Secure Deletion is a free AWS Security Academy lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the AWS Security Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Data Has a Lifecycle

Data is not meant to live forever. It is created, used actively, then aged into cheaper storage, and finally deleted when no longer needed.

Managing this lifecycle is a security practice: data you no longer keep cannot be breached, and minimizing retention shrinks both risk and cost.

S3 Storage Classes

S3 offers tiers from hot to cold: Standard for frequent access, Standard-IA (Infrequent Access), and the Glacier family for cheap, archival storage.

Moving data to the right class as it cools saves money, but archived data still needs the same encryption and access controls as active data.

Lifecycle Policies

S3 Lifecycle rules automate transitions and deletions. A rule might move objects to Standard-IA after 30 days, to Glacier after 90, and expire them after 365.

Automating retention ensures data does not linger past its useful or compliant life without anyone having to remember to clean it up.

{
  "Transition": { "Days": 90, "StorageClass": "GLACIER" },
  "Expiration": { "Days": 365 }
}

Retention vs Deletion

Two opposing forces shape lifecycle: retention requirements (keep records for X years for compliance) and minimization (delete data you no longer need).

A good policy balances them — keeping what regulation demands for exactly as long as required, then deleting it promptly to reduce exposure.

Object Lock for Compliance

S3 Object Lock enforces WORM (write once, read many): objects cannot be deleted or overwritten until a retention period passes.

Compliance mode prevents even the root account from deleting protected objects, satisfying strict regulatory retention rules and protecting logs from tampering.

Versioning and Recovery

S3 versioning keeps every version of an object, so an overwrite or delete can be undone.

A delete merely adds a delete marker; the data remains until you explicitly remove old versions. This protects against accidental and malicious deletion, but means true deletion requires expiring noncurrent versions.

Secure Deletion in the Cloud

In the cloud you do not wipe disks yourself; AWS handles physical destruction. Your job is to ensure the object is truly removed: delete all versions and any delete markers.

Because storage is encrypted, destroying or losing access to the encryption key can also render data unrecoverable — cryptographic erasure.

Cryptographic Erasure

When data is encrypted with a KMS key, deleting that key makes the ciphertext permanently unreadable, even if copies of the data persist somewhere.

This crypto-shredding is a powerful, fast way to render large datasets irrecoverable, useful when you must guarantee data is gone.

Deletion Across Services

Data lives in more than S3. EBS snapshots, RDS backups, DynamoDB tables, and logs all retain data.

A complete deletion plan covers every service where a copy might exist. Forgetting backups or replicas is a common way "deleted" data resurfaces during a breach or audit.

Data Minimization as Security

Data minimization — keeping only what you need for only as long as you need it — is a core security and privacy principle.

Every record you delete is one that can never be breached, mishandled, or subpoenaed. Lifecycle automation operationalizes minimization so reducing risk happens automatically rather than depending on someone remembering to clean up.

Govern with Automation

Enforce lifecycle and deletion at scale with automation: lifecycle policies for S3, retention settings on backups, and AWS Config rules to verify policies are applied everywhere.

Consistent, automated governance ensures sensitive data does not quietly accumulate beyond its intended life across your accounts.

Quick Check

Match the goal to the control.

Recap

Manage data through its lifecycle as a security practice: use S3 storage classes and Lifecycle rules to transition and expire data, balancing compliance retention against minimization. Object Lock enforces WORM for immutable records, while versioning protects against accidental deletion but requires expiring old versions for true removal. Secure deletion means removing every version and copy across services, with cryptographic erasure via KMS key deletion as a powerful backstop.

Frequently asked questions

Is the “Data Lifecycle and Secure Deletion” lesson free?

Yes — the full text of “Data Lifecycle and Secure Deletion” is free to read here on the web, and the AWS Security Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the AWS Security Academy course, upgrade to CoddyKit PRO.

What will I learn in “Data Lifecycle and Secure Deletion”?

Age out, archive, and remove data on a controlled schedule. You practise AWS Security Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start AWS Security Academy?

No prior experience is required. AWS Security Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Data Lifecycle and Secure Deletion” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this AWS Security Academy lesson?

Yes. Every AWS Security Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Block Public Access and Bucket Policies
  2. Access Points and Object Ownership
  3. Finding Sensitive Data with Amazon Macie
  4. Data Lifecycle and Secure Deletion
← Back to AWS Security Academy