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?

feita há 2 anos268 visualizações
2 Respostas
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
respondido há um ano
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

respondido há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas