You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to retrieve an S3 object with a specific versionId. In AWS's REST API documentation the versionId should be placed as a named parameter ?versionId=<the version ID>. But appending this string to the path of s3HTTP returns a "NoSuchKey".
Looking into the function setup_s3_url called in line 93 in s3HTTP.R
it percent-encodes the URL, so characters like "=" and "&" are mapped to "%3F" and "%3D" respectively.
This happens in line 358 of setup_s3_url in s3HTTP.R, where utils::URLencode is called with the parameter reserved = TRUE which makes all reserved characters like "=" and "&" be percent-encoded.
I understand that one would want to sanitize the URL, but is this a bug or a feature?
If it's a feature, how should I pass the versionId argument to s3HTTP and the other more high level functions like s3read_using?
> library("aws.s3")
>version_id<-'3GL4kqtJlcpXroDTDm3vjVBH40Nr8X8g'>object_path<- sprintf('%s?versionId=%s', 'my_object', version_id)
>aws.s3::s3HTTP(verb='GET', bucket='my_bucket_name', path=object_path)
Listof5$Code:chr"NoSuchKey"$Message:chr"The specified key does not exist."$Key:chr"my_object?versionId=3GL4kqtJlcpXroDTDm3vjVBH40Nr8X8g"...Errorin parse_aws_s3_response(r, Sig, verbose=verbose) :Not Found (HTTP404).
The text was updated successfully, but these errors were encountered:
duffau
changed the title
How to GET an object with a specific versionId from S3
How to GET an object with a specific versionId from S3
Nov 29, 2018
I'm trying to retrieve an S3 object with a specific
versionId
. In AWS's REST API documentation the versionId should be placed as a named parameter?versionId=<the version ID>
. But appending this string to the path ofs3HTTP
returns a "NoSuchKey".Looking into the function
setup_s3_url
called in line 93 in s3HTTP.Rit percent-encodes the URL, so characters like "=" and "&" are mapped to "%3F" and "%3D" respectively.
This happens in line 358 of
setup_s3_url
in s3HTTP.R, whereutils::URLencode
is called with the parameterreserved = TRUE
which makes all reserved characters like "=" and "&" be percent-encoded.I understand that one would want to sanitize the URL, but is this a bug or a feature?
If it's a feature, how should I pass the
versionId
argument tos3HTTP
and the other more high level functions likes3read_using
?The text was updated successfully, but these errors were encountered: