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
已提問 1 個月前檢視次數 98 次
1 個回答
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
專家
已回答 1 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南