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
답변함 일 년 전
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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠