Repository: getmoto/moto

Issue:
S3 GLACIER_IR class should not be in ARCHIVE_STORAGE_CLASSES
Currently GLACIER_IR class is in ARCHIVE_STORAGE_CLASSES list, which doesn't allow to retrieve the file. This should not be the case, it's in the name - 'instant retrieval'.

[https://github.com/getmoto/moto/blob/c194259b6096a865d2c990984740008c26f8b1d9/moto/s3/utils.py#L37](url)

Current error:
`E           botocore.errorfactory.InvalidObjectState: An error occurred (InvalidObjectState) when calling the GetObject operation: The operation is not valid for the object's storage class
`

AWS documentation:
[https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-class-intro.html](url)

> 

S3 Glacier Instant Retrieval (GLACIER_IR) – Use for long-term data that's rarely accessed and requires milliseconds retrieval. Data in this storage class is available for real-time access.

Hints from issue comments:
@bblommers: Hi @tkpkaaa, thanks for letting us know, and welcome to Moto! I've marked this as a bug.@ApogeeAC: Verified bug in Moto, verified GLACIER_IR GetObject working in Boto3.

Solution patch:
diff --git a/moto/s3/utils.py b/moto/s3/utils.py
index f7a46cb4e..5a779e574 100644
--- a/moto/s3/utils.py
+++ b/moto/s3/utils.py
@@ -34,7 +34,6 @@ user_settable_fields = {
 ARCHIVE_STORAGE_CLASSES = [
     "GLACIER",
     "DEEP_ARCHIVE",
-    "GLACIER_IR",
 ]
 STORAGE_CLASS = [
     "STANDARD",
@@ -42,6 +41,8 @@ STORAGE_CLASS = [
     "STANDARD_IA",
     "ONEZONE_IA",
     "INTELLIGENT_TIERING",
+    "GLACIER_IR",
+    "EXPRESS_ONEZONE",
 ] + ARCHIVE_STORAGE_CLASSES
 LOGGING_SERVICE_PRINCIPAL = "logging.s3.amazonaws.com"
 


Test patch:
diff --git a/tests/test_s3/test_s3_storageclass.py b/tests/test_s3/test_s3_storageclass.py
index 4ba0b3214..04829c18d 100644
--- a/tests/test_s3/test_s3_storageclass.py
+++ b/tests/test_s3/test_s3_storageclass.py
@@ -275,3 +275,18 @@ def test_s3_get_object_from_glacier():
         Bucket=bucket_name, Key="test.txt", ObjectAttributes=["StorageClass"]
     )
     assert resp["StorageClass"] == "GLACIER"
+
+
+@mock_aws
+def test_s3_get_object_from_glacierir():
+    s3_client = boto3.client("s3", region_name="us-east-1")
+    bucket_name = "tests3getobjectfromglacierir"
+    s3_client.create_bucket(Bucket=bucket_name)
+
+    s3_client.put_object(
+        Bucket=bucket_name, Key="test.txt", Body="contents", StorageClass="GLACIER_IR"
+    )
+
+    resp = s3_client.get_object(Bucket=bucket_name, Key="test.txt")
+
+    assert resp["StorageClass"] == "GLACIER_IR"