Closed dzolt closed 9 months ago
Hi @dzolt ,
Unfortunately we are not able to offer support for R2, Minio, Localstack , Digital Ocean Spaces or any other AWS clone as this is not our product. You might want to reach out to Cloudflare directly for support regarding this.
The error outlines that x-id
which (at least for AWS S3) describes the operation name - in this case ListBuckets
does not have service side support. R2 returns a 501 error which indicates a server side error, something that should be investigated with the R2 server directly.
Thanks, Ran~
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.
Checkboxes for prior research
Describe the bug
I'm trying to integrate R2 with my Express.js app and i have the following configuration and it fails with "NotImplemented: ListBuckets search parameter x-id not implemented".
I'm posting the issue here, as I am using the aws-sdk/client-s3 and it seems to be related to the API somehow.
Interesting part is that other commands like GetObjectCommand, PutObjectCommand are working.
SDK version number
@aws-sdk/package-name@version, ...
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v20.0.0
Reproduction Steps
export const objectStorage = new S3Client({ region: 'auto', endpoint: process.env.OBJECT_STORAGE_URL as string, credentials: { accessKeyId: process.env.OBJECT_STORAGE_ACCESS_KEY_ID as string, secretAccessKey: process.env.OBJECT_STORAGE_SECRET_ACCESS_KEY as string, }, });
const config = {}; const listBucketsCommand = new ListBucketsCommand(config); const buckets = await objectStorage.send(listBucketsCommand);
Observed Behavior
/Users/damianzoltowski/Personal/Projects/whatsart/whatsart-backend/node_modules/.pnpm/@smithy+smithy-client@2.1.18/node_modules/@smithy/smithy-client/dist-cjs/default-error-handler.js:8 const response = new exceptionCtor({ ^ NotImplemented: ListBuckets search parameter x-id not implemented at throwDefaultError (/Users/damianzoltowski/Personal/Projects/whatsart/whatsart-backend/node_modules/.pnpm/@smithy+smithy-client@2.1.18/node_modules/@smithy/smithy-client/dist-cjs/default-error-handler.js:8:22) at /Users/damianzoltowski/Personal/Projects/whatsart/whatsart-backend/node_modules/.pnpm/@smithy+smithy-client@2.1.18/node_modules/@smithy/smithy-client/dist-cjs/default-error-handler.js:18:39 at de_ListBucketsCommandError (/Users/damianzoltowski/Personal/Projects/whatsart/whatsart-backend/node_modules/.pnpm/@aws-sdk+client-s3@3.470.0/node_modules/@aws-sdk/client-s3/dist-cjs/protocols/Aws_restXml.js:4988:12) at processTicksAndRejections (node:internal/process/task_queues:95:5) at async /Users/damianzoltowski/Personal/Projects/whatsart/whatsart-backend/node_modules/.pnpm/@smithy+middleware-serde@2.0.15/node_modules/@smithy/middleware-serde/dist-cjs/deserializerMiddleware.js:7:24 at async /Users/damianzoltowski/Personal/Projects/whatsart/whatsart-backend/node_modules/.pnpm/@aws-sdk+middleware-signing@3.468.0/node_modules/@aws-sdk/middleware-signing/dist-cjs/awsAuthMiddleware.js:30:20 at async /Users/damianzoltowski/Personal/Projects/whatsart/whatsart-backend/node_modules/.pnpm/@smithy+middleware-retry@2.0.24/node_modules/@smithy/middleware-retry/dist-cjs/retryMiddleware.js:31:46 at async /Users/damianzoltowski/Personal/Projects/whatsart/whatsart-backend/node_modules/.pnpm/@aws-sdk+middleware-sdk-s3@3.470.0/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/region-redirect-endpoint-middleware.js:14:24 at async /Users/damianzoltowski/Personal/Projects/whatsart/whatsart-backend/node_modules/.pnpm/@aws-sdk+middleware-sdk-s3@3.470.0/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/region-redirect-middleware.js:9:20 at async /Users/damianzoltowski/Personal/Projects/whatsart/whatsart-backend/node_modules/.pnpm/@aws-sdk+middleware-logger@3.468.0/node_modules/@aws-sdk/middleware-logger/dist-cjs/loggerMiddleware.js:7:26 { '$fault': 'client', '$metadata': { httpStatusCode: 501, requestId: undefined, extendedRequestId: undefined, cfId: undefined, attempts: 1, totalRetryDelay: 0 }, Code: 'NotImplemented' }
Expected Behavior
Should list all buckets in the object storage
Possible Solution
No response
Additional Information/Context
No response