I need to check the storage class of an object inside an S3 bucket.
Is there a way to get the storage class of an S3 object using the AWS CLI v2?
You could use list-objects-v2.
For example:
aws s3api list-objects-v2 --bucket <bucket-name> --prefix <object_key> --query "Contents[*].StorageClass" --output text
Output:
GLACIER