CloudArcade

Guided architecture tour · 6–8 min

Give files an undo button — S3 Versioning

Protect a class project from a mistaken file replacement.

This tour teaches architecture decisions. Its services are not provisioned in the emulator.

Your goal

Protect a class project from a mistaken file replacement.

Why this matters

Your team uploads a new report, then realizes the old one was better. You will keep older copies, find one, and learn what an ordinary delete does.

Words you will use

An object is a file in S3. Its key is its name. A version ID labels one saved copy of that file.

How to proceed

Read each situation and choose an answer. The lesson explains the result. Try again if needed, then continue through all three decisions and finish the tour.

Play this architecture tour

1. Keep earlier copies

Your team saves report.pdf over the same file name each week. You want a way back if a new upload is wrong. Choose a setting to enable before future uploads.

What preserves earlier copies?

Enable S3 Versioning on the bucket.

Versioning keeps separate copies when you write to the same key. It does not recreate older copies that were already lost before you enabled it.

Future replacements receive their own version IDs.

Bucket versioning: Enabled

2. Find the copy you need

Yesterday’s report was correct. Today’s upload has a mistake, but both versions were saved. Choose how to read yesterday’s copy.

What identifies the older copy?

The object key and its older version ID.

The key finds the file’s name. The version ID selects the saved copy. Reading that version lets you check it before making it the current file again.

You can inspect the older report without guessing which copy it is.

GetObject: Key=report.pdf, VersionId=chosen-old-version

3. Understand an ordinary delete

Someone deletes report.pdf without choosing a version ID. Versioning is enabled. The file disappears from the normal view. Choose what to inspect.

What usually explains the missing file?

A delete marker now hides the older versions.

An ordinary delete adds a delete marker. Older versions can remain. Deleting a specific version is different and can permanently remove that copy, so inspect before deleting.

You know to check versions and the delete marker before assuming the report is gone.

List versions → inspect delete marker → recover the intended copy

Practice, then check your understanding

In the interactive tour, make each decision before seeing the outcome. Wrong answers receive coaching, and replay gives you a fresh attempt without duplicating earned XP.

Read the official AWS documentation for service behavior and production details.

Continue with another AWS learning guide