Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

FakeS3 doesn't support storage classes other than STANDARD #148

Open
loopsysdev opened this issue Jun 16, 2016 · 0 comments
Open

FakeS3 doesn't support storage classes other than STANDARD #148

loopsysdev opened this issue Jun 16, 2016 · 0 comments

Comments

@loopsysdev
Copy link

FakeS3 only supports the STANDARD class of storage. Running the following:

aws --endpoint-url <fakes3 url> s3 cp /tmp/foo s3://bucket-name/foo --storage-class REDUCED_REDUNDANCY

results in a key in FakeS3 with storage class standard:

> aws --endpoint-url http://s3.service.loop:8085 s3api list-objects --bucket bucket-name
{
    "Contents": [
        {
            "LastModified": "2016-06-16T07:54:48.573Z", 
            "ETag": "\"4f13dcb32c7ae164033a25a178533b67\"", 
            "StorageClass": "STANDARD", 
            "Key": "foo", 
            "Owner": {
                "DisplayName": "You", 
                "ID": "abc"
            }, 
            "Size": 28948
        }
    ]
}

However, going to the FakeS3 directory structure and finding the metadata for the key shows the following:


---
:md5: 4f13dcb32c7ae164033a25a178533b67
:content_type: 
:size: 28948
:modified_date: '2016-06-16T07:54:48.573Z'
:amazon_metadata:
  storage-class: REDUCED_REDUNDANCY
:custom_metadata: {}

The problem seems to be here, where the storage class is hard-coded at reporting time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant