AWS S3 Versioning, MFA Delete, and Websites

Build on your AWS S3 skills by learning about versioning, MFA Delete, static website hosting, and CORS.

Versioning

Versioning allows us to keep multiple versions of the same file in an S3 bucket. When versioning is enabled and we add a new file to an existing key, instead of overwriting the file, S3 adds a new version to the file.

In the example below, when versioning is turned off, the new tree.jpg file replaces the existing tree.jpg file. When versioning is enabled, the new tree.jpg file is added as a new version in the S3 bucket. When we enable versioning in a bucket, the existing objects in the bucket will have a null version.

Press + to interact
Uploading objects to S3
Uploading objects to S3

Versioning is turned off by default and should be explicitly enabled. Note that once versioning is enabled, it can’t be turned off, only suspended.

  • If we suspend versioning in a bucket:

    • The existing versions of the objects and any lifecycle rules configured for these versions
...

Get hands-on with 1400+ tech skills courses.