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?

gefragt vor 2 Jahren268 Aufrufe
2 Antworten
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
beantwortet vor einem Jahr
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

beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen