Skip to main content

Manage object lock

For your information

Object locking can be managed by:

If you have Object Lock enabled in the bucket, you can manage object locks. Available lock actions depend on the lock type and mode.

You can manage object locks in the control panel, via the S3 API, and via tools that use it, such as the AWS CLI.

Retention-period lock

Check for a retention-period lock

If you have segmented objects, you cannot check the lock status on individual segments — you can only check the lock on the object itself. Segments inherit the lock settings applied to the object.

  1. In the control panel, in the top menu, click Products and select S3.
  2. Go to Buckets.
  3. Open the bucket page → Objects tab.
  4. Open the object page.
  5. In the Object Lock block, check the retention status.

Enable retention-period lock

If both a retention-period lock and a legal hold are enabled for an object, the legal hold takes precedence.

To apply default retention to all new objects in the bucket, use the Enable default bucket retention section of the Object Lock instructions.

To upload an object with a lock already applied, use the AWS CLI; for more details, see the Upload object section of the AWS CLI instructions.

  1. In the control panel, in the top menu, click Products and select S3.

  2. Go to Buckets.

  3. Open the bucket page → Objects tab.

  4. Open the object page.

  5. In the Object Lock block, in the Retention line, click Edit.

  6. Select the Lock object checkbox.

  7. Select a lock mode.

  8. Specify the lock duration. Maximum lock duration:

    • for Compliance mode — one year. To set a Compliance lock for more than one year, use the API or tools, such as AWS CLI;
    • for Governance mode — 100 years.
  9. Click Save.

Change temporary lock duration

If the lock mode is set to:

  • Governance — the lock duration can be shortened or extended;
  • Compliance — the lock duration can only be extended.

In the control panel, you can only increase the lock period. To decrease the period, use the S3 API or tools that use it, such as the AWS CLI.

  1. In the control panel, in the top menu, click Products and select S3.

  2. Go to Buckets.

  3. Open the bucket page → Objects tab.

  4. Open the object page.

  5. In the Object Lock block, in the Retention line, click Edit.

  6. Specify the new lock duration. Maximum lock duration:

    • for Compliance mode — one year. To set a Compliance lock for more than one year, use the API or tools, such as AWS CLI;
    • for Governance mode — 100 years.
  7. Click Save.

Change temporary lock mode

You can only change the lock mode from Governance to Compliance.

You cannot change the retention mode in the control panel. Use the S3 API or tools that use it, such as the AWS CLI.

Disable temporary lock

You can only disable a temporary lock in Governance mode.

Only the Account Owner or a user with the member role can disable retention in the control panel.

  1. In the control panel, in the top menu, click Products and select S3.
  2. Go to Buckets.
  3. Open the bucket page → Objects tab.
  4. Open the object page.
  5. In the Object Lock block, in the Retention line, click Edit.
  6. Clear the Lock object checkbox.
  7. Click Save.

If you have segmented objects, you cannot check the lock status on individual segments — you can only check the lock on the object itself. Segments inherit the lock settings applied to the object.

  1. In the control panel, in the top menu, click Products and select S3.
  2. Go to Buckets.
  3. Open the bucket page → Objects tab.
  4. Open the object page.
  5. In the Object Lock block, check the legal hold status.

If both a temporary lock and a legal hold are enabled for an object at the same time, the legal hold has priority.

  1. In the control panel, in the top menu, click Products and select S3.
  2. Go to Buckets.
  3. Open the bucket page → Objects tab.
  4. Open the object page.
  5. In the Object Lock block, enable legal hold.
  1. In the control panel, in the top menu, click Products and select S3.
  2. Go to Buckets.
  3. Open the bucket page → Objects tab.
  4. Open the object page.
  5. In the Object Lock block, disable legal hold.