You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

从AWS Glacier恢复至S3的文件:临时存储位置及剩余时长查询

How to View Temporary Restore Details for Glacier Objects in S3

Great question! When you restore an object from AWS Glacier to S3, that "temporary copy" isn't a separate object in some hidden location—it's actually the original Glacier object, temporarily accessible in S3's standard storage tier for your specified duration. The confusion comes because the object's StorageClass still shows as GLACIER, but it has metadata flags indicating it's restored. Here's how to check the details:

Check Details for a Single Restored Object

Use the head-object command to pull the object's metadata, which includes restore status and expiry time:

aws s3api head-object --bucket YOUR_BUCKET_NAME --key YOUR_OBJECT_KEY

Look for the Restore field in the response—it will look something like this:

"Restore": "ongoing-request=\"false\", expiry-date=\"Fri, 15 Nov 2024 00:00:00 GMT\""

  • ongoing-request="false" means the restore is complete and the object is accessible
  • expiry-date tells you when the temporary access will end (you can calculate the remaining duration by comparing this to the current time)

List All Restored Objects in a Bucket

To batch-find all objects that are currently restored (and see their expiry times), use list-objects-v2 with a query filter to target objects with non-null Restore metadata:

aws s3api list-objects-v2 --bucket YOUR_BUCKET_NAME --query "Contents[?Restore != null]"

This will return only objects that have an active temporary restore, and each entry will include the Restore field with expiry details.

Why Standard List Commands Don't Show This

The list-objects and list-objects-v2 commands without filters show all objects, but they don't highlight the Restore metadata by default. Since the object's storage class remains GLACIER, you need to explicitly filter or check the metadata to see which ones are temporarily accessible.

This method works regardless of which tool you used to initiate the restore—all restore operations update the object's metadata in S3, so the AWS CLI commands will pick up the status correctly.

内容的提问来源于stack exchange,提问作者Oli

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 08:54:56