Closed mriedem closed 3 years ago
Apparently I was using the wrong endpoint when creating the S3 service object. I was using the endpoint from the service credentials JSON file I downloaded from the IBM COS dashboard for my instance (https://control.cloud-object-storage.cloud.ibm.com/v2/endpoints) but should be using https://s3.us-south.cloud-object-storage.appdomain.cloud.
Yes, I ran into the same issue. Also figured it out the same way you did. The instructions can be a bit more clear.
I'm using version 1.7.0 and simply trying to list buckets but I get this error:
I'm creating the S3 object like this:
And calling
listBuckets
like this:Credentials and everything seem OK otherwise I shouldn't be getting a 200 response. But it looks like the issue is the code is trying to parse XML when in fact it should be dealing with JSON, which reading https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/working-with-json.html and https://ibm.github.io/ibm-cos-sdk-js/AWS/S3.html#listBuckets-property I would expect the response body to be properly parsed into a JSON object for javascript.
I'm running within a nodejs v12.16.2 environment.
Is there some way to debug this, like would it help to get the headers off the response object?