RestoreObjectRequest requestRestore_ = new RestoreObjectRequest(bucket, keyy, 2);
s3Client.restoreObjectV2(requestRestore_);
ObjectMetadata response_ = s3Client.getObjectMetadata(bucket, keyy);
Boolean restoreFlag_ = response_.getOngoingRestore();
System.out.println(response_.getReplicationStatus());
System.out.format("Restoration status: %s.\n",
restoreFlag_ ? "in progress" : "not in progress (finished or failed)");
So, the code is from aws documentation and the first time I run it runs successfully telling me that the file will be moved to Standard storage; However when I check it it is still in glacier and the same snipped below logging "finished or not in progress".
I guess this could be happening because of no AWS permissions to restore, but it should be giving me error in the first place.