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:May 27, 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. After restoring an Archive object, you still get the following error when trying to access it:

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

Cause

The restored state of an Archive object is temporary. By default, it lasts one day and can be extended to a maximum of seven days using ossutil or an SDK. After this period expires, the object automatically returns to the Archive storage class and must be restored again before it can be accessed.

Solution

Choose a solution based on how often you need to access the object.

For temporary access

If you need occasional read access, restore the object and access it within the restoration window:

  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. Confirm the restoration is complete, then access the object before the restored state expires. To check restoration status, see How do I check whether an OSS object is restored?.

For frequent access

If you need regular access, change the object's storage class to Standard to avoid repeated restorations.

Note

If a lifecycle rule is configured on the bucket, it may transition the object back to Archive after the storage class change. To prevent this, create a Standard bucket without the lifecycle rule and migrate the object to it.

  1. Restore the object and confirm that it is accessible.

  2. While the object is in the restored state, change its storage class to Standard. For instructions, see Convert storage classes.