Repository: aws/aws-cli

Issue:
aws s3 cp with GLACIER_IR storage class
Confirm by changing [ ] to [x] below:
- [X] I've gone though the [User Guide](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html) and the [API reference](https://docs.aws.amazon.com/cli/latest/reference/)
- [X] I've searched for [previous similar issues](https://github.com/aws/aws-cli/issues) and didn't find any solution

Issue is about usage on:
aws s3 cp storage class

**Platform/OS/Hardware/Device**
Cent 7.5
aws-cli/2.4.4 

**Describe the question**

Anybody knows when the AWS CLI will suport then new Glacier instant, works with the API, but not via s3 cp

root ~ $ `aws s3 cp --follow-symlinks /data/emfs1/.projects/premiere/test/IMG_6723.MOV s3://XXX --storage-class GLACIER_IR`

```
aws: error: argument --storage-class: Invalid choice, valid choices are:

STANDARD | REDUCED_REDUNDANCY
STANDARD_IA | ONEZONE_IA
INTELLIGENT_TIERING | GLACIER
DEEP_ARCHIVE

Invalid choice: 'GLACIER_IR', maybe you meant:

STANDARD | REDUCED_REDUNDANCY
STANDARD_IA | ONEZONE_IA
INTELLIGENT_TIERING | GLACIER
DEEP_ARCHIVE

GLACIER
```

**Logs/output**

```
Invalid choice: 'GLACIER_IR', maybe you meant:

STANDARD | REDUCED_REDUNDANCY
STANDARD_IA | ONEZONE_IA
INTELLIGENT_TIERING | GLACIER
DEEP_ARCHIVE

```



Discussion:
Hi @kjaercasper,

Thanks for pointing this out! I do see that S3 APIs accept this as an option now.  I'll see if I can get a fix out within the next week.

Resolving patch:
diff --git a/awscli/customizations/s3/subcommands.py b/awscli/customizations/s3/subcommands.py
--- a/awscli/customizations/s3/subcommands.py
+++ b/awscli/customizations/s3/subcommands.py
@@ -249,12 +249,12 @@
 STORAGE_CLASS = {'name': 'storage-class',
                  'choices': ['STANDARD', 'REDUCED_REDUNDANCY', 'STANDARD_IA',
                              'ONEZONE_IA', 'INTELLIGENT_TIERING', 'GLACIER',
-                             'DEEP_ARCHIVE'],
+                             'DEEP_ARCHIVE', 'GLACIER_IR'],
                  'help_text': (
                      "The type of storage to use for the object. "
                      "Valid choices are: STANDARD | REDUCED_REDUNDANCY "
                      "| STANDARD_IA | ONEZONE_IA | INTELLIGENT_TIERING "
-                     "| GLACIER | DEEP_ARCHIVE. "
+                     "| GLACIER | DEEP_ARCHIVE | GLACIER_IR. "
                      "Defaults to 'STANDARD'")}
 
 


Test patch:
diff --git a/tests/unit/customizations/s3/test_copy_params.py b/tests/unit/customizations/s3/test_copy_params.py
--- a/tests/unit/customizations/s3/test_copy_params.py
+++ b/tests/unit/customizations/s3/test_copy_params.py
@@ -80,6 +80,15 @@ def test_standard_ia_storage_class(self):
                   'StorageClass': u'STANDARD_IA'}
         self.assert_params(cmdline, result)
 
+    def test_glacier_ir_storage_class(self):
+        cmdline = self.prefix
+        cmdline += self.file_path
+        cmdline += ' s3://mybucket/mykey'
+        cmdline += ' --storage-class GLACIER_IR'
+        result = {'Bucket': u'mybucket', 'Key': u'mykey',
+                  'StorageClass': u'GLACIER_IR'}
+        self.assert_params(cmdline, result)
+
     def test_website_redirect(self):
         cmdline = self.prefix
         cmdline += self.file_path