All Products
Search
Document Center

Object Storage Service:Why do I get the "The operation is not valid for the object's state" error when accessing a restored Archive object?

Last Updated:Jan 13, 2026

Description

An Object Storage Service (OSS) bucket is configured with a lifecycle rule that transitions objects from the Standard or Infrequent Access (IA) storage class to the Archive storage class after a specified period. Some Archive objects still fail to be accessed after they are restored, and the following error message is returned:

StatusCode=403, ErrorCode=InvalidObjectState, ErrorMessage="The operation is not valid for the object's state"

Cause

When an Archive object is restored, its accessible 'restored' state is temporary. By default, this state lasts for one day. This period can be extended up to a maximum of seven days using ossutil or an SDK. After this period expires, the object transitions back to the Archive storage class and cannot be accessed directly until it is restored again.

Solution

Select a solution based on how frequently you need to access the object.

For temporary access

If you need to read the object temporarily, perform the following steps:

  1. Restore the Archive object. For instructions, see Restore objects.

    Note

    Data retrieval fees apply when you restore an Archive object. For details, see Request fees.

  2. After confirming the restoration is complete, access the object before the restored state expires. To check the restoration status, see How do I check whether an OSS object is restored?.

For frequent access

If you need to access the object regularly, convert its storage class to Standard to avoid repeated restorations.

  1. Restore the object and confirm that it can be accessed.

  2. Change the storage class to Standard while the object is in the restored state. For instructions, see Convert storage classes.

    Note

    To prevent the lifecycle rule from transitioning the object back to the Archive storage class, create a new Standard bucket without this rule and migrate the object to it.