S3:SelectObjectContent does not support versionId

0

S3:SelectObjectContent should behave similar to S3:GetObject, Except it does select content from file. Why it does not support VersionId ? Do we have a plan to add VersionId support. This can enable many usecases.

Mahesh
feita há um mês98 visualizações
1 Resposta
0

Hi,

Although it is not described in the documentation, according to the following AWS GitHub repository issue, you can specify the versionId as a custom query param in the request:

SelectObjectContentRequest selectRequest = new SelectObjectContentRequest()
    .withBucketName(BUCKET)
    .withKey(KEY)
    .withExpression("SELECT count(*) from S3Object s")
    .withExpressionType(ExpressionType.SQL)
    .withInputSerialization(...)
    .withOutputSerialization(...);

selectRequest.putCustomQueryParameter("versionId", "AAA");

Have you tried it?

profile picture
ESPECIALISTA
respondido há um mês

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