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
gefragt vor einem Monat98 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor einem Monat

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