Courseiva
DEA-C01Chapter 3 of 18Objective 1.2

Amazon S3 as a Data Lake Store: Buckets, Objects, and Lifecycle Policies

Exam objective 1.2 is all about designing and implementing data storage with Amazon S3, but before you can design anything clever, you must understand the fundamental building blocks: buckets, objects, and lifecycle policies. These three concepts are the foundation of every modern data lake in the cloud. If you master these, you will understand how companies store petabytes of data without ever running out of space or paying too much — a skill the DEA-C01 exam absolutely demands.

12 min read
Intermediate
Updated Jul 23, 2026
Reviewed by Johnson Ajibi· Senior Network & Security Engineer · MSc IT Security

A simple way to picture Amazon S3 as a Data Lake Store: Buckets, Objects, and Lifecycle Policies

The Estate Manager Analogy

A head estate manager for a sprawling country estate oversees a vast, flat land with no designated storage sheds. When the estate's harvest arrives, the manager must decide: where to put it, how to label it, and when to get rid of old stock.

The estate itself is a data lake, a single massive storage area. Each storage shed the manager builds is a bucket, a container that holds only one type of crop, say, wheat or apples. Inside the shed, each sack of grain gets a unique tag, like a label that says 'Harvest 2024, Field 3' — that is an object. The manager never opens the sacks to count the grains; they just track the tags and ensure the roof keeps out rain (security).

The real skill is lifecycle policies. The manager knows that fresh strawberries spoil in a week, so they must be sold (used) or discarded after seven days. Wheat can last a year in a cool shed, so the manager sets a rule: move wheat to a cheaper, long-term barn after six months, and if it stays there for two years, compost it. The manager also sets transition rules: after thirty days, move older apples to the cider barn, where they become less expensive to store. This automated, rule-based waste and cost reduction is the very essence of an S3 Lifecycle Policy. The manager never touches a single sack; the rules just run on a schedule.

How It Actually Works

Let us start with the simplest idea: a data lake. Imagine a data lake as a single, giant pool of water where you can throw any data you like — videos, spreadsheets, pictures, database backups, log files — and it all floats there, accessible whenever you need it. Before cloud storage, companies built their own data lakes inside physical buildings, using rows of hard drives. That meant buying new hardware every time the lake grew, and hoping a drive did not fail and lose everything.

Amazon S3 (Simple Storage Service) is Amazon's version of that lake. It is a durable, scalable, and secure place on the internet where you can store any amount of data. The term 'object' refers to the individual file you store — a single photo, a single CSV file, a single video. Each object has two parts: the data itself (the file contents) and metadata (information about the file, like when it was created or who made it). Amazon S3 is 'object-based' storage, meaning it does not organise files in a traditional folder hierarchy like your computer's desktop does; instead, every object lives inside a flat container called a bucket.

A bucket is a top-level container that holds objects. Think of it as your designated storage space on S3. You must give each bucket a globally unique name (no other bucket in the entire world can have the same name) and you choose which AWS region (geographic location) stores it. Every object you upload must live inside a bucket. For example, if you are a bank, you might have one bucket called 'customer-statements-2024' and another bucket called 'loan-applications-backup'. There is no way to nest buckets inside each other; they are all at the same level. Inside each bucket, you can create folders (which are technically just prefixes in the object's name, but they look and act like folders).

The critical feature for the DEA-C01 exam is that S3 is designed to hold an infinite number of objects. There is no limit on how much data you can store in a single bucket. This makes it perfect for a data lake. However, storing infinite data can become very expensive if you never delete old data or move it to cheaper storage. This is where lifecycle policies come in.

A lifecycle policy is a set of rules you attach to a bucket. These rules automatically perform actions on your objects when they reach a certain age. There are two main types of actions:

Transition actions: These change the storage class of an object. For example, after 30 days, move objects from 'S3 Standard' (expensive, fast retrieval) to 'S3 Glacier Deep Archive' (very cheap, but takes hours to retrieve). This saves money on data you access rarely.

Expiration actions: These permanently delete objects after a set number of days. For example, delete log files older than 90 days because you only need them for compliance purposes for three months.

Lifecycle policies are incredibly powerful because they automate governance. Without them, a data lake would quickly become a chaotic, expensive mess. You can also set up a lifecycle policy that permanently deletes incomplete multipart uploads after a few days — a common exam scenario.

The final important concept is versioning. S3 can keep multiple versions of the same object. If you upload an object, then upload a newer version, S3 keeps both. Lifecycle policies can have special rules for noncurrent versions (older versions of an object) — for example, delete noncurrent versions 60 days after they become outdated. This is a common exam trap.

Why does this matter? Because the DEA-C01 exam wants you to design storage that is both cheap and compliant. You need to know when to use a lifecycle rule to move data to Glacier, and when to just delete it. You need to know that you cannot change a bucket's name once created, and that you cannot delete a bucket unless it is empty. These tiny operational details are what the exam tests.

This diagram shows a single S3 bucket containing multiple objects (logs, reports, videos) and the lifecycle rules applied to all objects: transitions to colder storage and expiration after set time periods.

Walk-Through

1

Create an S3 bucket

You navigate to the AWS S3 console and click 'Create bucket'. You choose a globally unique name (e.g., 'my-company-data-lake-2024'), select a region (e.g., US East), and configure basic settings like block public access (recommended for data lake security). This step creates the container where all your objects will live.

2

Upload objects into the bucket

You upload your first set of data files (e.g., .csv, .json, .parquet). Each file becomes an object with a unique key (its path within the bucket, e.g., 'logs/2024/01/01/server-log.csv'). You can upload via the console, CLI, or SDK.

3

Enable versioning on the bucket

You go to bucket properties and enable versioning. If versioning is enabled, every time you upload a new version of an object, the old version is retained. This protects against accidental overwrites or deletions, and is required for many compliance use cases.

4

Define lifecycle rules

You create a lifecycle configuration for the bucket. You decide: after 30 days, transition objects to S3 Glacier Instant Retrieval; after 365 days, transition to S3 Glacier Deep Archive; and after 1095 days, expire (delete) them. You also add a separate rule for noncurrent versions to delete them 60 days after they become outdated.

5

Test and monitor the lifecycle policy

After applying the policy, you wait 24 hours and then check the bucket's 'Storage Lens' or 'Inventory' report to confirm that objects are being transitioned. You also set up CloudWatch alarms to alert if any lifecycle actions fail (e.g., because a minimum storage duration penalty was triggered).

What This Looks Like on the Job

Let us walk through a real scenario. A streaming video company, QuickFlix, stores user viewing logs in Amazon S3. Every time a user watches a movie, a tiny JSON file is generated with the timestamp, movie ID, and user ID. QuickFlix generates about 500,000 of these log files per day. The data team needs to keep all logs for the last 7 days for real-time analytics (cost is low, access must be instant), keep logs for up to 90 days for monthly business reports (slower access is acceptable), and keep logs for up to 3 years for legal compliance (rarely accessed, but must be retrievable). After 3 years, the data can be permanently deleted.

The IT professional would create a single bucket called 'quickflix-viewing-logs' in the US East (N. Virginia) region. They would enable versioning on the bucket (so any accidental overwrite of a log file is reversible). Then they would create a lifecycle policy with the following rules:

A transition rule: move objects from S3 Standard to S3 Glacier Instant Retrieval after 7 days. This keeps the data accessible within milliseconds but reduces monthly storage cost by about 70%.

A second transition rule: move objects from S3 Glacier Instant Retrieval to S3 Glacier Deep Archive after 90 days. This moves data to the cheapest possible storage, but retrieval now takes 12 hours. Perfect for legal audits that require at least 24 hours' notice.

An expiration rule: permanently delete objects after 1095 days (3 years). This automatically removes old logs, preventing storage bills from growing forever.

The professional also sets up a lifecycle rule to clean up incomplete multipart uploads (if a log file upload failed, it leaves a fragment). They set this to delete fragments after 7 days.

During the next three years, the data team never touches a single lifecycle rule again. The system runs automatically. When the legal team requests logs from two years ago, the team can go to the bucket, see the objects in Glacier Deep Archive, and initiate a restore request (which takes up to 12 hours). The cost is pennies per gigabyte, instead of dollars.

Common tasks the IT professional does in this scenario:

Checking the lifecycle policy in the AWS Management Console to ensure the transition dates are working.

Creating a new bucket for another data source (e.g., 'quickflix-ad-impressions') and writing a different lifecycle policy (maybe keep ads data only 30 days because it is less regulated).

Debugging why a lifecycle rule did not run — usually because the rule's filter (prefix or tag) was misconfigured.

Using AWS CLI commands like 'aws s3api put-bucket-lifecycle-configuration' to apply policies programmatically instead of clicking through the console.

This is the daily reality of working with S3 as a data lake store. It is not about manually moving files; it is about setting up automated rules that enforce data governance and cost control.

How DEA-C01 Actually Tests This

The DEA-C01 exam tests your ability to design lifecycle policies that balance cost, compliance, and performance. You will not be asked to write a lifecycle policy from scratch in JSON (though you should be able to read one). Instead, you will face scenario-based multiple-choice questions where you must pick the configuration that meets specific business requirements.

The exam loves to test these specific concepts:

The difference between a transition action and an expiration action. A common trap question: 'You need to keep data for 30 days for fast access, then move it to cheaper storage for 6 months, then delete it.' The correct answer has one transition rule (to Glacier) and one expiration rule (set to 6 months). A wrong answer would use a single rule that both transitions and expires at the same time, which is not allowed in the same lifecyle rule.

Lifecycle rules apply to current versions and noncurrent versions separately. If versioning is enabled, you must set separate rules for 'current' and 'noncurrent' object versions. A trap asks: 'You want to delete old versions of an object 60 days after they become outdated.' The correct answer uses the 'NoncurrentVersionExpiration' action, not the standard 'Expiration' action.

Minimum storage duration charges. If you transition an object to S3 Glacier Flexible Retrieval and then delete it within 90 days, you pay a penalty (the minimum storage charge). The exam tests when it is cost-effective to use a lifecycle rule versus manual deletion.

Lifecycle policies are written as XML (or JSON in API calls) and are applied to the entire bucket unless you filter by prefix or tag. A common trap: 'You have two types of data in one bucket, and you need different retention policies.' The correct answer uses a filter in the lifecycle rule (e.g., prefix = 'logs/' for one rule and prefix = 'reports/' for another).

You cannot use a lifecycle rule to reduce the redundancy of an object. S3 has different redundancy features (S3 One Zone-IA stores data in only one Availability Zone), but lifecycle policies do not change redundancy — only storage class.

Lifecycle rules do not work on objects in the 'S3 Glacier' storage class itself (you must first restore the object). This is a common exam trap: they ask you to transition an object already in Glacier to a different storage class, and the correct answer is 'you cannot — you must restore it first'.

Exam questions often use numbers like '7 days', '30 days', '90 days', and '365 days' as transition ages. Memorise that S3 Standard to S3 Standard-IA has a 30-day minimum, S3 Standard to Glacier Flexible Retrieval has a 30-day minimum, and S3 Standard to Glacier Deep Archive has a 180-day minimum. If a question says 'move data to Deep Archive after 30 days', it violates the minimum transition age requirement for that storage class.

The exam also tests 'new' features like S3 Intelligent-Tiering (automatically moves data between tiers based on access patterns) and how lifecycle policies interact with it. Remember that Intelligent-Tiering automatically handles transitions, but you can still apply an expiration rule on top of it.

Finally, the exam loves to ask about the naming of buckets. Bucket names must be globally unique, 3-63 characters long, and can only contain lowercase letters, numbers, periods, and hyphens. They cannot look like an IP address (e.g., 192.168.1.1).

Key Takeaways

An S3 bucket is a global namespace: its name must be unique across all AWS accounts worldwide.

Lifecycle policies can automate both transition (move to cheaper storage) and expiration (delete) actions on your objects.

Transition actions can only move data to colder storage tiers; you cannot use a lifecycle rule to move data to a warmer tier.

If you enable versioning on a bucket, lifecycle rules must be configured separately for current and noncurrent versions of objects.

Objects stored in S3 Glacier storage classes must be restored before you can access them, even with a lifecycle policy.

Lifecycle policies run approximately once per day, so actions are not applied instantly to new or existing objects.

Easy to Mix Up

These come up on the exam all the time. Here's how to tell them apart.

S3 Standard

Designed for frequently accessed data (latency in milliseconds).

Highest storage cost per GB among S3 classes.

No minimum storage duration; delete anytime without penalty.

S3 Glacier Deep Archive

Designed for rarely accessed data that can tolerate 12-hour retrieval.

Lowest storage cost per GB among S3 classes.

Minimum storage duration of 180 days; early deletion incurs a penalty fee.

S3 Lifecycle Transition Action

Changes the storage class of an object (e.g., from Standard to Glacier).

Does not delete the object; it remains accessible in the new class.

Can only move objects to colder (cheaper) storage tiers.

S3 Lifecycle Expiration Action

Permanently deletes the object from the bucket.

Cannot be reversed unless versioning is enabled (then it creates a delete marker).

Often used for compliance: 'delete after X years'.

S3 Versioning Enabled

Each upload creates a new version; old versions are kept as noncurrent.

Protects against accidental deletion or overwrite.

Lifecycle rules can separately manage current and noncurrent versions.

S3 Versioning Suspended

New uploads overwrite the current version; no new version is created.

Does not protect against overwrites (the old data is gone).

Lifecycle rules only apply to the single current version.

Watch Out for These

Mistake

I can change the name of an S3 bucket after I create it.

Correct

You cannot rename an S3 bucket. You must create a new bucket and move the objects, or use the AWS S3 Batch Operations to copy objects to a new bucket with the correct name.

Many beginners assume that cloud resources behave like folders on a local hard drive, which can be renamed freely. S3 bucket names must be globally unique and immutable because they are part of the URL that clients use to access the data.

Mistake

A lifecycle policy can move objects from S3 Glacier Deep Archive to S3 Standard if I need faster access.

Correct

Lifecycle policies only move data to cheaper, colder storage (transition to lower-cost tiers). To move an object from Glacier Deep Archive to a warmer tier, you must manually restore the object first via a restore request, which takes hours.

The word 'transition' sounds like it works both ways, but AWS designed lifecycle policies only to reduce cost over time. Beginners do not expect that the rules are one-directional.

Mistake

If I delete a bucket, I do not need to worry about its lifecycle policy — it is deleted automatically with the bucket.

Correct

A bucket cannot be deleted unless it is empty. You must first delete all objects (and all versioned objects if versioning is enabled) before you can delete the bucket. The lifecycle policy itself is deleted with the bucket, but only after the bucket is empty.

Many beginners think deletion is a single atomic action. In reality, AWS enforces safety measures to prevent accidental data loss.

Mistake

Lifecycle policies apply immediately to all existing objects in the bucket as soon as I create the rule.

Correct

Lifecycle policies only apply to objects that are created after the rule is applied, or they look at the current age of existing objects. The rule runs once per day, so it may take up to 24 hours for the first action to occur on existing objects.

Beginners expect instant gratification. Knowing the asynchronous, daily-run nature of lifecycle policies is critical for the exam because they love to ask about timing.

Do You Actually Know This?

Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.

Frequently Asked Questions

Can I have two buckets with the same name in different AWS accounts?

No. S3 bucket names are globally unique across all AWS accounts worldwide. If someone else has already taken the name 'my-data-lake', you cannot use it in any region or account.

What happens if I upload a file with the same name as an existing object?

If versioning is enabled, the new object becomes the current version and the old version is retained as a noncurrent version. If versioning is suspended, the old object is overwritten permanently.

Can I change the storage class of an object manually instead of using a lifecycle policy?

Yes, you can manually change an object's storage class using the S3 console, CLI, or SDK. However, lifecycle policies are preferred for automating this at scale.

Does a lifecycle policy cost extra money?

No. Lifecycle policies themselves are free. However, the transition actions they trigger incur the costs of the new storage class (e.g., moving to Glacier has a retrieval cost if you later access the data, and there are minimum storage duration charges).

I created a lifecycle rule but nothing happened after 30 days. Why?

Lifecycle policies run approximately once per day (not instantaneously). Also, you may have misconfigured the filter (prefix or tag) so the rule did not apply to your objects. Check the bucket's lifecycle configuration and ensure the filter matches your objects.

Can I recover an object that was deleted by a lifecycle expiration rule?

If versioning was enabled on the bucket, the deleted object becomes a noncurrent version and can be restored. If versioning was not enabled, the object is permanently deleted and cannot be recovered.

Terms Worth Knowing

Keep going

You've finished Amazon S3 as a Data Lake Store: Buckets, Objects, and Lifecycle Policies. Continue through the DEA-C01 study guide to build a complete picture of the exam.

Done with this chapter?