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?

asked a year ago262 views
2 Answers
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
answered a year ago
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

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions