ibm-cloud-docs / cloud-object-storage

cloud-object-storage
15 stars 46 forks source link

s3.aws and cloudSimplifieR libraries are out of date #118

Closed jp-loonytoon closed 1 year ago

jp-loonytoon commented 3 years ago

I've not been able to find a way of using the s3.aws library with COS successfully, and I think that this documentation page is quite out of date now. Following the examples in this article I get a 403 AccessDenied when attempting to access an object. For instance, attempting to call

bucketlist()

I get the following response:

List of 5
 $ Code          : chr "AccessDenied"
 $ Message       : chr "Access Denied"
 $ Resource      : chr "/eu-geo/"
 $ RequestId     : chr "1c84b8a5-79d9-4e02-8696-7cd508ba5068"
 $ httpStatusCode: chr "403"
 - attr(*, "headers")=List of 9
  ..$ date            : chr "Mon, 31 May 2021 21:27:17 GMT"
  ..$ x-clv-request-id: chr "1c84b8a5-79d9-4e02-8696-7cd508ba5068"
  ..$ server          : chr "Cleversafe"
  ..$ x-clv-s3-version: chr "2.5"
  ..$ accept-ranges   : chr "bytes"
  ..$ x-amz-request-id: chr "1c84b8a5-79d9-4e02-8696-7cd508ba5068"
  ..$ www-authenticate: chr "Basic realm=\"Cleversafe Dispersed Storage Network\""
  ..$ content-type    : chr "application/xml"
  ..$ content-length  : chr "251"
  ..- attr(*, "class")= chr [1:2] "insensitive" "list"
 - attr(*, "class")= chr "aws_error"
 - attr(*, "request_canonical")= chr "GET\n/\n\nhost:eu-geo.s3.eu.cloud-object-storage.appdomain.cloud\nx-amz-date:20210531T212715Z\n\nhost;x-amz-dat"| __truncated__
 - attr(*, "request_string_to_sign")= chr "AWS4-HMAC-SHA256\n20210531T212715Z\n20210531/eu-geo/s3/aws4_request\n21018dadac0b93f063a34b64854094c362ee2d85db"| __truncated__
 - attr(*, "request_signature")= chr "AWS4-HMAC-SHA256 Credential=f65423e4595f4cb887c151b7babf3863/20210531/eu-geo/s3/aws4_request,SignedHeaders=host"| __truncated__
NULL

And the cloudSimplifieR library mentioned later on in the article has now been removed from the CRAN repository.

I have found that the paws library works well for accessing COS objects. It seems to be well maintained and its what I use now for my data science projects.

nglange commented 3 years ago

Really appreciate the feedback - it's difficult to keep up with the various third-party tools. If you have any example code for paws you'd be willing to share I'd be happy to include it in a new topic, in any case I'll check out paws and retire the current topic. Thanks!