aws-sdk-js-v3 icon indicating copy to clipboard operation
aws-sdk-js-v3 copied to clipboard

v3 Upgrade guide references a link to bucketEndpoint that does not exist

Open supersime opened this issue 2 years ago • 3 comments

Describe the issue

There was a change in https://github.com/aws/aws-sdk-js-v3/commit/1bb77006c0a83f41028dbb928c2e723cd36dec3c that added the following text and associated link to the UPGRADING guide (which is hosted at https://github.com/aws/aws-sdk-js-v3/blob/main/UPGRADING.md):

s3BucketEndpoint changed to bucketEndpoint. See more in v3 reference for bucketEndpoint

Two issues:

  1. The link https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-s3/interfaces/s3clientconfig.html#bucketendpoint does not seem to exist - it takes you to the top of the page rather than a section on bucketEndpoint.
  2. Related to (1), there is no description of the bucketEndpoint at all on the https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-s3/interfaces/s3clientconfig.html page.

Links

https://github.com/aws/aws-sdk-js-v3/blob/main/UPGRADING.md https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-s3/interfaces/s3clientconfig.html

supersime avatar Feb 02 '23 01:02 supersime

Hi @supersime, thanks for bringing this to our attention. I agree we need to update our documentation regarding endpoints since a few changes were done regarding to this, after endpoint 2.0. I will mark this issue to be reviewed so we can address this further.

Thanks!

yenfryherrerafeliz avatar Feb 13 '23 19:02 yenfryherrerafeliz

Any update on this issue? I'm having trouble with TypeScript saying that bucketEndpoint does not exist on type S3ClientConfigType, but I can't find any documentation on it apart from what is mentioned in this issue.

  Object literal may only specify known properties, and 'bucketEndpoint' does not exist in type 'S3ClientConfigType'.ts(2345)

eamon0989 avatar Mar 23 '23 09:03 eamon0989

A fix was released today that allows bucket inputs to serve as request endpoints.

const s3 = new S3({
  region: "us-west-2",
  bucketEndpoint: true,
});

const get = await s3.getObject({
  Bucket: "https://my-bucket.s3.us-west-2.amazonaws.com/", // can be any URL, localhost etc.
  Key: "filename.ext",
});

https://github.com/aws/aws-sdk-js-v3/releases/tag/v3.525.0 https://www.npmjs.com/package/@aws-sdk/client-s3/v/3.525.0

kuhe avatar Feb 29 '24 21:02 kuhe

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.

github-actions[bot] avatar Mar 19 '24 00:03 github-actions[bot]