S3 InvalidObjectState: Restore the Archived Object, Then Download It
InvalidObjectState on an Amazon S3 download usually means the object exists but its data is archived, so a regular GET cannot read it until an asynchronous restore creates an accessible copy. To fix it, check the storage class, request a supported restore tier, watch the x-amz-restore header, and make a separate Standard copy if you need long-term online access.
What InvalidObjectState Really Means
The message InvalidObjectState: The operation is not valid for the object's storage class often appears when an application calls GetObject on an S3 object stored in Glacier Flexible Retrieval or Deep Archive. The object exists, its metadata is visible, and the IAM principal might have permission to access it. However, its payload is archived and cannot be read immediately. The missing step is an S3 restore request followed by a wait for the temporary restored copy.
Granting s3:GetObject again, changing an object ACL or renaming a key will not fix this error. Start by inspecting the storage class and restore status. A permission error and an archival state error are different problems. The REST API may report an HTTP 403 for archived objects even when your actual error code is InvalidObjectState; always read the specific error code.
Jake: "The audit CSV is in our bucket, but the download failed. Did somebody delete it?"
Ethan: "No. We can see the metadata. It is archived; we need to request a restore before downloading it."
First, find out which storage class your object is in. It decides how long you wait and what you pay.
Which S3 Glacier Classes Need Restore?
| Class or tier | Direct GET? | Restore behavior |
|---|---|---|
| S3 Glacier Instant Retrieval | Yes | No restore request: immediate retrieval, normal object GET. |
| S3 Glacier Flexible Retrieval (GLACIER) | No, until restored | Temporary copy; specify restore days and speed. |
| S3 Glacier Deep Archive (DEEP_ARCHIVE) | No, until restored | Temporary copy; Standard or Bulk. |
| S3 Intelligent-Tiering Archive Access | No, until retrieved | Restore moves object back to Frequent Access; no expiration days. |
| S3 Intelligent-Tiering Deep Archive Access | No, until retrieved | Restore moves object back to Frequent Access; no expiration days. |
| S3 Standard / Standard-IA | Yes | No archival restore needed. |
The difference between Glacier Instant Retrieval and Glacier Flexible Retrieval is easy to miss. “Glacier” in the storage-class name does not always mean a long restore job. List or HEAD the key to confirm its actual storage class before planning an urgent retrieval.
S3 Intelligent-Tiering is a separate workflow: the underlying StorageClass can read INTELLIGENT_TIERING, while its archive access tier is revealed by archival status metadata. Leave out the Days value when you restore from the Intelligent-Tiering archive tiers.
Restore Tiers, Timing, and Availability
| Tier | Flexible Retrieval | Deep Archive | Typical use |
|---|---|---|---|
| Expedited | Usually 1–5 minutes for objects below about 250 MB | Not supported | Small, urgent archives; capacity not guaranteed without provisioned capacity. |
| Standard | Typically 3–5 hours | Typically within 12 hours | Planned recovery with moderate urgency. |
| Bulk | Typically 5–12 hours; retrieval and request charges currently free | Typically within 48 hours | Very large, time-flexible archives. |
The published times are typical, not hard guarantees or deadlines. Requested capacity, object count and service conditions affect actual completion. Choosing Expedited for Deep Archive is invalid; choosing Expedited in Flexible Retrieval can fail temporarily if on-demand expedited capacity is unavailable. Retry later, select Standard, or evaluate provisioned expedited capacity if an established emergency-retrieval workflow justifies it.
S3 Batch Operations supports Standard and Bulk restores, not Expedited. Batch jobs report that a restore request was initiated, not that the objects are already readable. That distinction matters when an audit team is waiting for several thousand objects.
Before You Restore: Confirm Account, Bucket, Region and Key
Verify that your AWS CLI account, bucket Region, key and object version match the object you want. Versioned buckets may contain archived old versions, while the current version uses a different class. Check the version ID, so you restore the version you meant.
Use head-object to read metadata without retrieving the object body. The --query expression below returns storage class, size, restore state and archival tier when available.
💻 Where to run these commands
Easiest: AWS CloudShell, nothing to install. Sign in to the AWS Management Console, choose your Region at the top right, then click the CloudShell icon (a small >_ terminal symbol) in the top bar, or type CloudShell in the search box and open it. When the $ prompt appears, paste a command and press Enter. CloudShell already has the AWS CLI, uses your console permissions and costs nothing extra.
On your own computer: install AWS CLI version 2 (installers for Windows, macOS and Linux are on the AWS CLI page), run aws configure once (or aws configure sso if your company signs in through single sign-on), and check it works with aws sts get-caller-identity. Then paste commands into Terminal on Mac or Linux, or PowerShell or Command Prompt on Windows.
Windows tip: a line ending in a backslash ( \ ) continues on the next line in CloudShell, Mac and Linux. In PowerShell use a backtick ( ` ) instead, in Command Prompt a caret ( ^ ), or simply join the lines into one. JSON inside single quotes works as shown in CloudShell; on Windows, save the JSON in a file and pass it as file://name.json.
Python examples: save the code in a file such as script.py, install the AWS SDK with pip install boto3, and run python script.py (python3 on Mac and Linux). It uses the same credentials as the AWS CLI; CloudShell has Python and boto3 ready.
Replace example values such as my-bucket, my-function, 111122223333 (an account ID) and us-east-1 with your own.
aws sts get-caller-identity
aws s3api get-bucket-location --bucket audit-backup-example
aws s3api head-object \
--bucket audit-backup-example \
--key audit/2024/ledger.csv \
--query '{Class:StorageClass,Size:ContentLength,Restore:Restore,ArchiveStatus:ArchiveStatus}'For a versioned object, add --version-id to head-object, restore-object and subsequent operations. Check that you can list the bucket only if your IAM scope allows it; missing ListBucket access does not automatically mean a known-key restore cannot run.
If you only need one file back, you can do it with a single command.
Restoring One Object with the AWS CLI
For Glacier Flexible Retrieval or Deep Archive, supply a temporary-copy duration in whole days and an appropriate retrieval tier. This command initiates a Standard restore lasting seven days once the copy is available:
aws s3api restore-object \
--bucket audit-backup-example \
--key audit/2024/ledger.csv \
--restore-request '{"Days":7,"GlacierJobParameters":{"Tier":"Standard"}}'For a non-urgent Deep Archive restore, change the tier to Bulk. You can close the terminal while S3 processes the request. A successful initiation is not a completed download.
Typical responses are HTTP 202 Accepted for a newly initiated restore and HTTP 200 for an object with an available restore in certain repeat-request cases. A RestoreAlreadyInProgress response means work is already underway; examine the current status instead of queuing duplicate requests.
boto3 Restore and Status Checking
The same steps work in Python. In production, use a bounded poll interval, handle ClientError, and store the job state for workflows involving many files. Check HEAD every few minutes rather than several times a second; the retrieval work takes hours, not milliseconds.
import boto3
from botocore.exceptions import ClientError
s3 = boto3.client('s3', region_name='us-east-1')
bucket = 'audit-backup-example'
key = 'audit/2024/ledger.csv'
try:
response = s3.restore_object(
Bucket=bucket,
Key=key,
RestoreRequest={
'Days': 7,
'GlacierJobParameters': {'Tier': 'Standard'}
}
)
print('Restore submitted:', response['ResponseMetadata']['HTTPStatusCode'])
except ClientError as exc:
if exc.response['Error']['Code'] == 'RestoreAlreadyInProgress':
print('Restore already running')
else:
raise
metadata = s3.head_object(Bucket=bucket, Key=key)
print('Storage class:', metadata.get('StorageClass'))
print('Restore header:', metadata.get('Restore'))
print('Archive tier:', metadata.get('ArchiveStatus'))When reading metadata for Intelligent-Tiering archive objects, send a restore request appropriate to that tier instead of assuming the above seven-day request applies to every storage class. In SDK applications, head_object and get_object are different operations with very different consequences for an archived object.
Read x-amz-restore and Know When a GET Will Work
The x-amz-restore header is the simplest post-request status check. Using AWS CLI:
aws s3api head-object \
--bucket audit-backup-example \
--key audit/2024/ledger.csv \
--query '{StorageClass:StorageClass,Restore:Restore}'| Restore metadata | Interpretation |
|---|---|
ongoing-request="true" | Restore is still in progress; attempting GET can fail. |
ongoing-request="false", expiry-date="..." | Temporary restored copy is available until the reported expiry, subject to lifecycle expiry. |
| Restore field absent | No visible restore state in this response; inspect class, tier and version before concluding anything. |
For Flexible Retrieval and Deep Archive, an expiry date appears after completion. S3 Intelligent-Tiering archive retrieval behaves differently: objects transition to Frequent Access and are not kept as a separately expiring temporary copy. Consider S3 restore-completion event notifications when many files are involved.
Download the Restored Object and Verify It
After ongoing-request="false", download using the normal S3 API. If there are many files, first validate a small representative set. Verify expected sizes and, where a trustworthy known checksum exists, compare checksums. An archive retrieval being complete does not prove the file is the correct version or that downstream applications can parse it.
aws s3 cp \
s3://audit-backup-example/audit/2024/ledger.csv \
./ledger.csv
wc -c ./ledger.csvWhen using versioned keys, remember that aws s3 cp operates on the current object version by default. To retrieve a specific previous version, use aws s3api get-object --version-id instead.
Jake: "So once the restore finishes, the file is back for good?"
Ethan: "Only for the days you asked for. The restored copy is temporary; if you need it permanently, copy it into a normal storage class before it expires."
Restore Days: Why the Copy Is Temporary
A completed Flexible Retrieval or Deep Archive restore creates a readable temporary copy that lasts for the requested days. The archived original remains in the archive storage class. Once the temporary copy expires, GET requests again return InvalidObjectState until another restore completes.
For example, an audit restore with Days=7 does not make a seven-year-old archive permanently active. You continue paying the archive storage charge and pay for temporary restored-copy storage at applicable S3 Standard rates while it exists. A lifecycle expiration deleting the underlying object can override the requested restore lifespan.
Jake: "Our restored report opened yesterday. Why is it unavailable next week?"
Ethan: "The seven-day window expired. We should copy it into Standard before that deadline if it needs to stay online."
Make the Object Permanent with a New S3 Copy
If the requirement is permanent online availability, copy the restored object to a new key with STANDARD storage class. The safer option is to use a different key or bucket first, validate it, and only then update applications. Replacing an original archived key can interfere with retention policies, versioning, audit evidence and legal holds.
aws s3api copy-object \
--bucket audit-backup-example \
--key active/audit-2024-ledger.csv \
--copy-source audit-backup-example/audit/2024/ledger.csv \
--storage-class STANDARD \
--metadata-directive COPYFor objects larger than the single-copy API limit, use the AWS CLI high-level aws s3 cp workflow or a multipart-copy implementation after confirming its storage class and metadata behavior; ordinary copy-object is limited to objects of 5 GB or less in a single copy request. Always check key names, ownership, encryption, retention and the lifecycle rule on the destination before using the new copy as a source of truth.
Discover an Entire Archived Prefix
An S3 folder is a prefix in object keys, not a separate directory that is restored as one object. You must identify each key under that prefix and initiate a restore per key, or submit a Batch Operations job. Listing a prefix itself is not a restore request.
aws s3api list-objects-v2 \
--bucket audit-backup-example \
--prefix audit/2024/ \
--query 'Contents[].{Key:Key,Bytes:Size,StorageClass:StorageClass}' \
--output tableListObjectsV2 exposes the storage class, which is useful for identifying GLACIER and DEEP_ARCHIVE keys before restoring. For S3 Intelligent-Tiering, LIST alone does not identify its internal archival tier; query HEAD metadata or use an appropriately configured S3 Inventory report. For very large prefixes, Inventory is a scalable starting point.
Restore a Moderate Folder with a Guarded Python Script
For a few hundred or a few thousand keys, a small script can list objects and submit restore requests carefully. Use dry-run mode first; count the keys and total bytes, then run only after cost and retention review. A script is not a substitute for Batch Operations at enormous object counts.
import boto3
from botocore.exceptions import ClientError
BUCKET = 'audit-backup-example'
PREFIX = 'audit/2024/'
DRY_RUN = True # Review counts before setting False
s3 = boto3.client('s3', region_name='us-east-1')
pages = s3.get_paginator('list_objects_v2').paginate(
Bucket=BUCKET, Prefix=PREFIX
)
count, total_bytes = 0, 0
for page in pages:
for obj in page.get('Contents', []):
key = obj['Key']
storage_class = obj.get('StorageClass', 'STANDARD')
if storage_class not in ('GLACIER', 'DEEP_ARCHIVE'):
continue
count += 1
total_bytes += obj['Size']
if DRY_RUN:
print('WOULD RESTORE:', key, storage_class)
continue
try:
s3.restore_object(
Bucket=BUCKET,
Key=key,
RestoreRequest={
'Days': 7,
'GlacierJobParameters': {'Tier': 'Bulk'}
}
)
print('REQUESTED:', key)
except ClientError as exc:
code = exc.response['Error']['Code']
if code == 'RestoreAlreadyInProgress':
print('ALREADY RESTORING:', key)
else:
print('FAILED:', key, code)
print('Objects:', count, 'Bytes:', total_bytes)This intentionally handles only explicit Glacier Flexible Retrieval and Deep Archive storage classes. Expand it for versioned objects, Intelligent-Tiering archive states and per-object retry scheduling only after validating those requirements. For a large number of objects, use S3 Batch Operations or a paced script rather than a tight loop of restore requests.
If you need thousands of your objects back, let S3 do the looping for you.
S3 Batch Operations: Large-Scale Recovery
S3 Batch Operations is the appropriate managed path for many thousands or millions of archived objects. Create a manifest listing the exact bucket and keys (or use an S3 Inventory report), choose the S3 Batch Operations restore operation, select Standard or Bulk, and configure an IAM role that allows the job to read the manifest and initiate object restores. For regular Glacier classes, specify ExpirationInDays; for Intelligent-Tiering archive tiers, leave it out.
Batch Operations reports success once a restore request is initiated for each object. It does not wait until the object is readable. Plan a separate completion check using HeadObject, restore-completion events or periodic sampling. You cannot use the Expedited retrieval tier through S3 Batch Operations.
Glacier-class objects and Intelligent-Tiering archived objects need separate Batch Operations restore jobs. A single manifest and job is not a universal shortcut for every cold-storage tier.
Create a Batch Operations Manifest Safely
A useful audit manifest lists only the objects actually requested by compliance, rather than every archived item in a bucket. Check object versions if your bucket is versioned, because an S3 Inventory report may contain version information that matters. Validate a handful of sample keys against HEAD metadata before approving the job.
When using S3 Inventory for discovery, configure the source bucket, destination report bucket, frequency, prefix filtering and relevant optional fields. Wait for your inventory report to be delivered; it is not an instant snapshot. For a smaller curated list, create a CSV manifest in the documented S3 Batch Operations manifest format.
Your job role needs S3 Batch Operations permissions, the object restore permission, and permission to read the manifest and write any completion report. For encrypted manifest/report buckets, check KMS authorization as well.
S3 Restore Permissions and Encryption
A restore call requires s3:RestoreObject for the target object. Reading restored content also requires s3:GetObject, and searching objects may require s3:ListBucket. Your organization policy, bucket policy, access point policy or KMS key policy can add restrictions too. A restoration does not override explicit denies.
For SSE-KMS encrypted objects, ensure the reading principal and KMS key policies permit the necessary cryptographic operations. If you restore or copy across accounts, you may need to coordinate with the bucket owner, IAM role and key administrators. Troubleshoot AccessDenied separately from InvalidObjectState; the latter usually points to archival state.
Troubleshooting Restore Requests That Fail
| Observed symptom | Likely interpretation | Next action |
|---|---|---|
InvalidObjectState during GET | Archived payload is not yet available | HEAD the key, request restore, wait for completion. |
RestoreAlreadyInProgress | Another request is working | Monitor rather than start repeated jobs. |
GlacierExpeditedRetrievalNotAvailable | Expedited on-demand capacity unavailable | Retry later, use Standard, or consider provisioned capacity. |
InvalidArgument or another validation error | Unsupported tier/class or illegal Days for Intelligent-Tiering | Review storage class/tier and tier-specific request structure. |
AccessDenied | IAM, bucket or key restrictions | Check RestoreObject, GetObject, policies and KMS access. |
| Restore completed but GET fails | Wrong version/key, copy expired, or permissions | Inspect exact version, x-amz-restore and expiry. |
The S3 console may show the restore workflow under the object’s properties or actions, while the CLI reveals the exact underlying API error code. Preserve request IDs and timestamps when escalating to AWS Support.
Why a Lifecycle Rule Archived the Object
S3 Lifecycle policies often explain why a previously readable backup became archived without any manual action. A transition rule can move objects from Standard into Glacier Flexible Retrieval or Deep Archive after a configured age, or Intelligent-Tiering can automatically move cold data into its archive tiers. You often notice this only when you urgently need a restore.
Inspect both your bucket lifecycle configuration and the object’s creation/transition history. A lifecycle rule can continue to act on a newly copied Standard object if the destination prefix is still in scope, so fixing the object alone may not address the long-term access requirement.
aws s3api get-bucket-lifecycle-configuration \
--bucket audit-backup-exampleKeep your lifecycle rules in place while you troubleshoot; they are rarely the thing to change. Policies often exist for compliance and cost control. Instead document which prefixes must remain hot and introduce a carefully scoped exception or destination location when permitted.
Before you restore a whole folder, it is worth knowing what your restore will cost.
Pricing Anatomy of One Restore
A real restore estimate has several components: retrieval requests, retrieval volume where charged, temporary restored-copy storage, ongoing archive storage, downstream GET or data transfer, and optionally S3 Batch Operations charges. A permanent copied object adds ongoing storage in its destination class. The number of objects can matter as much as the total GB.
Bulk retrieval and request charges are currently free for S3 Glacier Flexible Retrieval. Deep Archive Bulk retrieval has a per-GB fee and may incur request fees. Regional prices vary, and pricing pages can change; use the official S3 calculator before approving large recoveries.
Even if the retrieval tier has a zero retrieval fee, the restored readable copy is not automatically free. Keeping a terabyte temporarily available for seven days has a measurable Standard storage cost.
Worked Cost Example: Restore 1 TB in Bulk
Illustrative US East (N. Virginia) calculation for 1,024 GB, ten 102.4 GB objects, a seven-day temporary restored-copy window and the example public rates of $0.0025/GB for Deep Archive Bulk retrieval and $0.023/GB-month for S3 Standard storage. These are planning assumptions, not a quote for your account or Region.
| Cost item | Calculation | Illustrative result |
|---|---|---|
| Deep Archive Bulk data retrieval | 1,024 GB × $0.0025/GB | $2.56 |
| Temporary Standard copy (7 days) | 1,024 GB × $0.023 × 7/30 | About $5.50 |
| Deep Archive Bulk request fee | Per-request rate × object count | Small for ten objects; verify current regional price |
| Original archived storage | Continues during restoration | Not included in incremental estimate |
| Cross-Region or internet data transfer | Depends on where data is read | Additional if applicable |
| Total shown items | Retrieval + temporary-copy storage | About $8.06 plus requests and other applicable charges |
If the exact same 1,024 GB were instead held in S3 Glacier Flexible Retrieval and restored using Bulk, retrieval and restore request charges are currently free; the temporary Standard storage component would still be approximately $5.50 for seven days using the same illustrative rate. For an archive containing one million tiny objects, request pricing and Batch Operations fees can be much more important than in this ten-object example.
Jake: "Does free Bulk retrieval mean our audit recovery is completely free?"
Ethan: "Not necessarily. We still pay to hold the temporary readable copy, plus any applicable extra requests, transfers and processing."
Worked Audit Recovery: Scope the Folder Before Restore
Imagine that an external auditor needs 120 backup files stored under s3://audit-backup-example/audit/2024/. The archive was moved to Deep Archive by a lifecycle rule seven months ago. Nobody deleted it; the audit team simply cannot read the payload immediately. The requirement is to make the files available for seven days and preserve their immutable archived source copies.
First, identify the AWS account and bucket Region. List the prefix and record each object’s key, size, storage class and version ID. Verify the exact 120 files requested by the audit team; leave unrelated personal records and other years of backups archived. Save a manifest and a checksum inventory where available.
Second, calculate the likely total bytes and number of requests. Deep Archive Bulk can take up to about two days typically, so confirm the audit deadline and decide if Standard retrieval (typically within 12 hours) is needed. If the audit date is sufficiently far away, choose Bulk and seven-day restore duration.
Worked Audit Recovery: Launch, Watch and Deliver
For a limited list, issue restore-object for the selected keys with Days=7 and Tier=Bulk. For a large inventory, create an S3 Batch Operations restore job in the archive’s Region. Record the initiation time, manifest hash and expected file count.
Monitor completion using restore events or periodic HEAD requests. Batch Operations completion confirms initiation, not retrieval completion. Once each file is readable, copy the verified file to a controlled audit-delivery prefix in Standard or deliver via a short-lived, authenticated workflow, subject to security policy. Leave the archived originals unchanged.
Finally, test representative files using downstream applications, preserve an evidence log of which versions were provided, and set a cleanup date for the temporary delivery copies. If your compliance team needs permanent access to some objects, explicitly copy only those to a non-archive class and review your lifecycle rules so they are not silently re-archived.
Monitoring Many Restores Without Busy Polling
For batch workflows, build a small state machine: DISCOVERED → REQUESTED → IN_PROGRESS → AVAILABLE → VERIFIED → DELIVERED, with a failure state for policy or validation errors. Persist states to DynamoDB, a database or a controlled CSV report. This creates an audit trail and avoids issuing duplicate restore requests on every retry.
S3 Event Notifications can tell downstream systems when an object restore completes, but consumers should still validate the key and exact version. Configure a dead-letter path for failed notification delivery if your workflow depends on it. Periodic HEAD requests provide a useful reconciliation mechanism for missed events.
What to Do When Expedited Is Unavailable
Expedited retrieval is designed for urgent Flexible Retrieval and Intelligent-Tiering Archive Access restores, not Deep Archive. On-demand capacity can be unavailable. A failure can be capacity-related rather than a bad file. For predictable urgent demand, consider provisioned expedited capacity; it has its own ongoing charges and guarantees.
When a bulk recovery is already underway, check whether you can upgrade the in-progress restore to a faster tier before sending duplicate requests. For a single business-critical object, Standard retrieval might be acceptable; for compliance deadlines, communicate documented typical timing rather than promising an exact completion minute.
Keeping a Restore From Raising Your Bill for Good
A common emergency reaction is to copy the whole archived dataset into Standard. That solves immediate access but can raise monthly storage costs substantially and might violate retention controls. Prefer a minimal scoped restore, decide which items really need a permanent copy, and delete no longer needed delivery copies according to policy.
Also review minimum storage durations: Glacier Flexible Retrieval and Instant Retrieval generally have 90-day minimum storage duration charges, while Deep Archive has a 180-day minimum. Moving or deleting archives early can create prorated charges. Storage economics should be assessed alongside recovery-time objectives.
Practical Decision Matrix
| Your problem | Preferred path | Why |
|---|---|---|
| One Deep Archive object needed tomorrow | Standard restore | Usually much faster than Bulk; Expedited not supported. |
| Hundreds of Deep Archive files with two-day lead time | Bulk, manifest or Batch Operations | Lower retrieval cost for planned recovery. |
| Urgent small Flexible Retrieval file | Expedited if available | Typical minutes for eligible objects. |
| Glacier Instant Retrieval file | Direct GET | No asynchronous restore necessary. |
| Millions of objects in a prefix | S3 Inventory plus Batch Operations | Operationally tractable at high counts. |
| Same object must stay online for months | Restore then copy to Standard | Temporary restore alone expires. |
A Production Restore Runbook
Write the restore runbook before an incident. Record a list of buckets and prefixes, data owners, KMS key owners, the AWS Region, versioning configuration, lifecycle policy scope, restore tiers and acceptable recovery times. Add escalation instructions for expedited-capacity failures or cross-account permission problems.
During an incident, the first operator verifies the exact object identity; a second reviews scope and expected cost for large restore jobs. Use least-privilege permissions. After a trial restore, compare retrieved contents against the expected archive manifest. Collect your restore request IDs, event timestamps and final delivered object keys so someone else can audit what you did.
Jake: "Can I just click Restore on everything and sort it out later?"
Ethan: "That works poorly for large archives. Scope first, pick the right tier, and document the temporary storage charges."
Frequently Confused Errors and Their Meanings
InvalidObjectState: the object exists, but this operation is not valid for its current storage class or state. AccessDenied: permission failure, which can also occur during a restore or subsequent GET. NoSuchKey: the requested key is not available at that name or version. RestoreAlreadyInProgress: a restore is already underway. GlacierExpeditedRetrievalNotAvailable: an expedited-capacity failure.
Keep the full ClientError response when troubleshooting, rather than logging only the sentence “download failed.” The API code, request ID, bucket, key, Region and version ID distinguish all five cases immediately.
Final Checklist Before Closing the Incident
Confirm the object storage class and precise key/version; select a supported tier; calculate requests and temporary-copy cost; request restoration; read x-amz-restore; verify the downloaded content; document any permanent copies; and check whether a lifecycle rule will archive the output again.
For a large collection, confirm the Batch Operations job only initiated requests and separately track availability. If you are archiving for a long-term compliance program, run periodic sampled restore tests so your recovery process is validated before the next urgent audit.
For readers preparing for an AWS certification
We have been covering AWS certifications alongside our fixes, so here is a short extra for readers studying for one. If you only came for the fix, you already have it; feel free to skip this part.
Exams that test this topic: Solutions Architect – Associate (SAA-C03) • CloudOps Engineer – Associate (SOA-C03) • Developer – Associate (DVA-C03 from December 1, 2026).
Here are the exam-style questions this topic tends to raise, with the reasoning you need to answer them:
1. GetObject on an object in S3 Glacier Flexible Retrieval returns InvalidObjectState. What must happen first?
Start a restore (RestoreObject) to create a temporary readable copy, wait for it to finish, then download the object.
2. Which S3 storage classes need a restore before you can read an object?
S3 Glacier Flexible Retrieval and S3 Glacier Deep Archive, plus the Archive Access and Deep Archive Access tiers of S3 Intelligent-Tiering. S3 Glacier Instant Retrieval does not.
3. How do you check whether a restore has finished?
Call HeadObject: the x-amz-restore header shows ongoing-request="false" and an expiry date once the copy is ready.
4. Which retrieval tier is fastest for S3 Glacier Flexible Retrieval, and how long does it usually take?
Expedited, typically 1 to 5 minutes. Standard takes 3 to 5 hours and Bulk 5 to 12 hours.
5. Which retrieval options does S3 Glacier Deep Archive offer?
Standard (within 12 hours) and Bulk (within 48 hours). There is no Expedited tier.
6. You must restore thousands of archived objects listed in a CSV file. Which feature do you use?
S3 Batch Operations with the Restore operation and the CSV (or an S3 Inventory report) as the manifest.
Exam codes and dates change often. Our AWS certification changes page keeps track of what is current.
Frequently Asked Questions
What does InvalidObjectState mean for an S3 Glacier object?
The archived data cannot be read with GetObject until a restore makes it available, unless the object is in a directly readable class such as Glacier Instant Retrieval.
How long does a Deep Archive restore take?
Standard retrieval typically finishes within 12 hours; Bulk typically finishes within 48 hours. These are typical, not guaranteed deadlines.
What are the S3 Glacier restore tiers?
Expedited, Standard and Bulk are retrieval tiers. Expedited is unavailable for Deep Archive; Standard and Bulk are supported.
Is an S3 Glacier restore permanent?
Not for Glacier Flexible Retrieval or Deep Archive. The restored copy expires after the specified number of days unless you make a separate permanent copy.
How do I permanently change an archived object back to S3 Standard?
Restore it, wait for completion, then copy the available object to a key or bucket using the STANDARD storage class.
Why is Expedited retrieval sometimes unavailable?
Expedited on-demand retrieval capacity can be unavailable; use Standard or consider provisioned expedited capacity for planned needs.
How can I tell which S3 objects are archived without restoring them?
Use ListObjectsV2 or S3 Inventory for storage classes, and HeadObject for per-object metadata and Intelligent-Tiering archive status.
Does Glacier Instant Retrieval require a restore request?
No. Glacier Instant Retrieval objects support direct access, subject to normal permissions and charges.
How do I check an S3 restore with the AWS CLI?
Run aws s3api head-object and inspect the Restore value, which reflects the x-amz-restore header.
Can I restore an entire S3 prefix at once?
Not with one normal RestoreObject request. Enumerate keys or use S3 Batch Operations with an object manifest.
Does Batch Operations wait until all objects are readable?
No. Its restore job tracks initiation of restore requests; monitor availability separately.
What does a seven-day restore mean?
For Flexible Retrieval or Deep Archive, the temporary accessible copy remains available for the requested duration after completion, subject to lifecycle expiry.
How much does a 1 TB Deep Archive bulk restore cost?
It depends on Region, object count, days and data transfer. At illustrative $0.0025/GB, retrieval of 1,024 GB is $2.56; add temporary Standard storage and applicable request charges.
What is the cheapest Glacier restore option?
Bulk is generally the lowest-cost tier. Bulk retrievals from Glacier Flexible Retrieval are currently free, while Deep Archive Bulk has applicable retrieval charges.
Can an S3 lifecycle rule automatically archive objects?
Yes. Lifecycle transition rules can move objects into Glacier classes, and Intelligent-Tiering can archive cold objects according to its access-tier mechanics.
Can I restore archived objects using boto3?
Yes. Call restore_object with the appropriate restore request, then inspect head_object until the content is available.
Final Takeaway
Revision note. Written October 24, 2026; updated November 23, 2026 with the 5 GB copy limit and exam-style questions. "Patience is a virtue," says the old proverb; a Deep Archive restore takes hours, and the request only needs sending once.