Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Support for get object attributes (Checksum) #571

Closed
colesiegel opened this issue Jul 15, 2022 · 2 comments
Closed

Support for get object attributes (Checksum) #571

colesiegel opened this issue Jul 15, 2022 · 2 comments

Comments

@colesiegel
Copy link

colesiegel commented Jul 15, 2022

Hi,

Is there any support for setting and retrieving object attributes such as Checksum?

I would like to be able to PUT a file in the local bucket with x-amz-checksum-sha256 and then retrieve this value using GetObjectAttributes: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html

Example:

aws s3api get-object-attributes --bucket bucket --key document/file.png --object-attributes Checksum
{
    "LastModified": "2022-07-11T17:02:38+00:00",
    "VersionId": "n.WUv1jVIYRx_mvziPTSHjSY0VyVplEH",
    "Checksum": {
        "ChecksumSHA256": "vxcz2rPw/8iKGWYsZc0TlsP4kYCVqq13s4pHUEKz94E="
    }
}

When I PUT file in local bucket with x-amz-checksum-sha256, it doesn't seem to set anything in the metadata.json file. I am not sure where I should write this info to if I want to be able to read it using GetObjectAttributes.

Any suggestions? Thanks!

PS - seen this issue (#89 ) but not sure if checksum is actually part of the object metadata, or stored elsewhere? It is not under the metadata fields in the AWS console

image

@colesiegel colesiegel changed the title Support for object attributes (Checksum) Support for get object attributes (Checksum) Jul 15, 2022
@ar90n
Copy link
Owner

ar90n commented Jul 17, 2022

Hi @colesiegel
serverless-s3-local only launches S3rver. So if S3rver supports this feature, serverless-s3-local will be able to meet your requirement. Please try S3rver independently and check if it supports this feature?

@colesiegel
Copy link
Author

Thanks @ar90n I raised a feature request there, seems like it's not supported yet.

jamhall/s3rver#801

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

2 participants