I am trying to restore object from deep archive using aws sdk python.
After calling restoring object, the object is under the progress of the restoring.
During waiting it to be restored, I would like to know the progress of its status or remaining time of the restoring from deep archive to standard in aws sdk (python).
Below is my simple python code.
object_key = 'deep-archive/00_00000.json'
while restore_status != 'COMPLETED':
response = s3.head_object(Bucket=bucket, Key=object_key)
print(response)
I found some information by head_object but when I looked at the response,
there are only information for whether the object is under restoring or not, but the information for remaining time of the restoring cannot be found.
Below is the metadata in the head_object but the detailed progress of restoring cannot be found.
{'ResponseMetadata': {'RequestId': '9RGRA64H5X0KP5AX', 'HostId': 's72QRZquT+RKvqfq6OWLbgO0eATMJGSC7Yo6F2uKitBb96MgvXcMGabl3YifWKbXqsM0AGSqSWm230o3ZStN4w==', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amz-id-2': 's72QRZquT+RKvqfq6OWLbgO0eATMJGSC7Yo6F2uKitBb96MgvXcMGabl3YifWKbXqsM0AGSqSWm230o3ZStN4w==', 'x-amz-request-id': '9RGRA64H5X0KP5AX', 'date': 'Tue, 16 May 2023 07:11:25 GMT', 'last-modified': 'Tue, 18 Apr 2023 10:25:06 GMT', 'x-amz-restore': 'ongoing-request="true"', 'x-amz-restore-request-date': 'Tue, 16 May 2023 07:01:11 GMT', 'x-amz-restore-expiry-days': '1', 'x-amz-restore-tier': 'Standard', 'etag': '"3931d7b6496afa10e9051362bf3aa232-63"', 'x-amz-storage-class': 'DEEP_ARCHIVE', 'x-amz-server-side-encryption': 'AES256', 'accept-ranges': 'bytes', 'content-type': 'application/json', 'server': 'AmazonS3', 'content-length': '1073807360'}, 'RetryAttempts': 0}, 'AcceptRanges': 'bytes', 'Restore': 'ongoing-request="true"', 'LastModified': datetime.datetime(2023, 4, 18, 10, 25, 6, tzinfo=tzutc()), 'ContentLength': 1073807360, 'ETag': '"3931d7b6496afa10e9051362bf3aa232-63"', 'ContentType': 'application/json', 'ServerSideEncryption': 'AES256', 'Metadata': {}, 'StorageClass': 'DEEP_ARCHIVE'}
I would very much appreciated it if you could give me the guidance.