Skip to main content

Manage object lock

For your information

Object locking can be managed by:

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

Object locking can be managed in the control panel, through S3 API, and tools that use it—for example, AWS CLI.

Retention-period lock

Check for a retention-period lock

If you have objects with segments, 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, on the top menu, click Products and select S3.
  2. Go to the Buckets section.
  3. Open the bucket page → Objects tab.
  4. Open the object page.
  5. In the Object Lock block, check the retention-period lock 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 have the retention-period lock applied to all new objects in a bucket by default, use the Enable retention-period lock in a bucket by default section of the Object Lock guide.

To upload an object with a lock enabled immediately, use AWS CLI; for details, see the Upload object section of the AWS CLI guide.

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

  2. Go to the Buckets section.

  3. Open the bucket page → Objects tab.

  4. Open the object page.

  5. In the Object Lock block, in the Retention-period lock row, 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 extend the lock duration. To reduce the duration, use the S3 API or tools that use it, such as AWS CLI.

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

  2. Go to the Buckets section.

  3. Open the bucket page → Objects tab.

  4. Open the object page.

  5. In the Object Lock block, in the Temporary lock row, 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 AWS CLI.

Disable temporary lock

You can only disable a temporary lock in Governance mode.

In the control panel, a temporary lock can only be disabled by the Account Owner or a user with the member role.

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

If you have objects with segments, 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, on the top menu, click Products and select S3.
  2. Go to the Buckets section.
  3. Open the bucket page → Objects tab.
  4. Open the object page.
  5. In the Object Lock block, check the status of the legal hold.

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, on the top menu, click Products and select S3.
  2. Go to the Buckets section.
  3. Open the bucket page → Objects tab.
  4. Open the object page.
  5. In the Object Lock block, enable the legal hold.
  1. In the control panel, on the top menu, click Products and select S3.
  2. Go to the Buckets section.
  3. Open the bucket page → Objects tab.
  4. Open the object page.
  5. In the Object Lock block, disable the legal hold.