All Products
Search
Document Center

:What do I do if the "The operation is not valid for the object's state" error message is returned when I access a restored Archive object?

Last Updated:Jan 04, 2024

Description

Lifecycle rules are configured for an Object Storage Service (OSS) bucket. After you restore an Archive object in the bucket, you cannot access the object, and the following error information is returned:

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

Cause

By default, an Archive object remains in the restored state for one day after you restore it. You can use ossutil or OSS SDKs to extend this period to up to seven days. When the period ends, the object returns to the frozen state.

Solution

Check whether the object is in the restored state. If the object is not restored, perform the following steps to restore the object and change its storage class to Standard:

  1. Restore the Archive object. For more information, see Restore objects.

    Note

    You are charged data retrieval fees when you restore an Archive object. For more information, see API operation calling fees.

  2. Check whether the object is restored. For more information, see How do I check whether an OSS object is restored?

  3. After you restore the object, change the storage class of the restored object to Standard. For more information, see Convert storage classes.

    To prevent the storage class of the restored object that is converted to Standard from being automatically converted to Archive, we recommend that you create a Standard bucket and then migrate the Standard object to the new bucket.

    Note

    After you create a bucket, the storage class of objects stored in the bucket cannot be changed.