What does the parameter "select-type=2" mean in SelectObjectContent? Why do we need this?

1

select-type parameter is very confusing. I've tried tweaking aws-cli to generate different values, and it even returns UnauthorizedAccessError.

KindResult
no select-typeUnauthorizedAccessError
select-type=1UnauthorizedAccessError
select-type=2OK
select-type=3UnsupportedCustomerProtocol

Is it due to some historical reason?

已提问 2 年前268 查看次数
2 回答
1

It is an historical parameter used to define S3 Select response protocol (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTSelectObjectAppendix.html). The only available value for select-type is 2.

AWS
Vincent
已回答 1 年前
0

I coded this on windows 10 and it worked. Put your values in for mine. You will need the s3:GetObject permission on your IAM user to do this command.

aws s3api select-object-content --bucket "bucket-name" --key "key.csv" --expression "select * from s3object" --expression-type "SQL" --input-serialization "{"CSV": {}, "CompressionType": "NONE"}" --output-serialization "{"CSV": {}}" outfile.csv

已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则