我用的是R包
aws.s3
下面的代码用于从S3读取元数据。
library(aws.s3)
head_object("my_object", bucket = "my_bucket")
[1] TRUE
attr(,"x-amz-id-2")
[1] "abc"
attr(,"x-amz-request-id")
[1] "abc"
attr(,"date")
[1] "Sat, 08 Dec 2018 00:01:34 GMT"
attr(,"last-modified")
[1] "Fri, 07 Dec 2018 20:45:47 GMT"
attr(,"etag")
[1] "\"abc\""
attr(,"x-amz-meta-source-info")
[1] "how can I write this from R?" <---- created meta data in AWS console
attr(,"accept-ranges")
[1] "bytes"
attr(,"content-type")
[1] "application/zip"
attr(,"content-length")
[1] "100"
attr(,"server")
[1] "AmazonS3"