Skip to navigation

Legal hold

A lock with no end date. It stays until you remove it.

A legal hold stops a file version from being deleted or overwritten, like a retention, but it has no end date. It stays until someone turns it off. Use it to keep files during a dispute, an audit or an investigation, for as long as needed.

A legal hold works on its own or together with a Governance or Compliance retention. While the hold is on, the version cannot be deleted, even if its retention has ended. Legal holds work only in buckets with Object Lock, and you set them on one version at a time.

1

Open Lock Settings

Open the bucket and turn on Show Versions. Open the version’s ⋮ menu and select Lock Settings.

2

Turn on the switch

In Version Details, turn on the Legal Hold switch.

Version Details with the Legal Hold switch pointed out below the Retention section
3

Confirm

In Enable Legal Hold, select Confirm.

The Enable Legal Hold window with the Confirm button

Turn off the Legal Hold switch in the version’s Lock Settings and select Confirm in Disable Legal Hold. The version can then be deleted, unless a retention still applies.

The Disable Legal Hold window with the Confirm button

Deleting a version on hold

While the hold is on, nobody can delete the version. The console shows Legal Hold Active and only lets you close the window.

The Legal Hold Active window saying the version cannot be deleted until the Legal Hold is removed

Use the AWS CLI

# Turn the hold on
aws s3api put-object-legal-hold --bucket my-locked-bucket --key myfile.txt --legal-hold Status=ON --profile zata
# Turn it off
aws s3api put-object-legal-hold --bucket my-locked-bucket --key myfile.txt --legal-hold Status=OFF --profile zata