GLACIER (Glacier Flexible Retrieval) and DEEP_ARCHIVE are the cheapest classes because the data is kept offline. You cannot read it directly. get-object without a version id reads the latest version into a file, and for an archived object it answers:
aws s3api get-object --bucket market-docs-ilb7q1 --key archive/2025.csv 2025.csvAn error occurred (InvalidObjectState) when calling the GetObject operation: The operation is not valid for the object's storage class(aws s3 cp only prints a warning and skips the file.) First you restore it: S3 makes a temporary, readable copy for the number of days you ask. The object itself stays archived.
Restoring
aws s3api restore-object --bucket market-docs-ilb7q1 --key archive/2025.csv --restore-request Days=1,GlacierJobParameters={Tier=Expedited}Days is how long the copy stays readable. The tier sets the wait and the price:
| Tier | GLACIER | DEEP_ARCHIVE |
|---|---|---|
Expedited | 1-5 minutes | not available |
Standard | 3-5 hours | within 12 hours |
Bulk | 5-12 hours | within 48 hours |
Waiting for it
aws s3api head-object --bucket market-docs-ilb7q1 --key archive/2025.csv --query Restoreongoing-request="true" means it is still working; sleep 180 makes the shell wait three minutes before you ask again. ongoing-request="false", expiry-date="…" means it is done: read the object as usual until that date.
Pick the class when you archive, knowing how fast you might need the data back. GLACIER_IR needs no restore at all, at a higher price per read.