Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support AWS_ENDPOINT_URL #5364

Closed
2 tasks
mnapoli opened this issue Oct 16, 2023 · 6 comments
Closed
2 tasks

Support AWS_ENDPOINT_URL #5364

mnapoli opened this issue Oct 16, 2023 · 6 comments
Assignees
Labels
feature-request New feature or enhancement. May require GitHub community feedback.

Comments

@mnapoli
Copy link

mnapoli commented Oct 16, 2023

Describe the feature

I would love for the JS SDK to support the new AWS_ENDPOINT_URL variable.

See https://aws.amazon.com/fr/blogs/developer/new-improved-flexibility-when-configuring-endpoint-urls-with-the-aws-sdks-and-tools/ and https://docs.aws.amazon.com/sdkref/latest/guide/feature-ss-endpoints.html#ss-endpoints-sdk-compat

Use Case

Use Localstack locally.

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

SDK version used

v3

Environment details (OS name and version, etc.)

macOS

@mnapoli mnapoli added feature-request New feature or enhancement. May require GitHub community feedback. needs-triage This issue or PR still needs to be triaged. labels Oct 16, 2023
@RanVaknin RanVaknin self-assigned this Oct 16, 2023
@RanVaknin RanVaknin removed the needs-triage This issue or PR still needs to be triaged. label Oct 18, 2023
@RanVaknin
Copy link
Contributor

Hi @mnapoli ,

This is already supported. You need to update your SDK version.

import { S3Client, ListObjectsV2Command } from "@aws-sdk/client-s3";

const client = new S3Client({ region: "us-east-1" });

try {
    const response = await client.send(new ListObjectsV2Command({
        Bucket: "testbucket"
    }))
} catch (error) {
    console.log(error)
}
$ npm list
[email protected] /Users/rvaknin/test_folder/4940
└── @aws-sdk/[email protected]

$ AWS_ENDPOINT_URL="https://my-subdomain.s3.us-east-1.com" node sample.mjs
Error: getaddrinfo ENOTFOUND testbucket.my-subdomain.s3.us-east-1.com
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'testbucket.my-subdomain.s3.us-east-1.com',
  '$metadata': { attempts: 1, totalRetryDelay: 0 }
}

Thanks,
Ran~

@RanVaknin RanVaknin closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2023
@tsibley
Copy link

tsibley commented Oct 18, 2023

@RanVaknin Thanks, that's great to know. It's not clear from the changelog what the first version to support this was. I tried grepping a variety of patterns to find where this functionality is implemented in the repo, but found bupkiss. Can you shed any light here? (Is it the version in your example, 3.428.0?)

@RanVaknin
Copy link
Contributor

RanVaknin commented Oct 18, 2023

Hi @tsibley ,

The change was introduced on smithy-typescript middleware package which was made generic recently.

Is it the version in your example, 3.428.0?

Yes, you can see it from the output of $npm list I shared in my previous comment.

Thanks,
Ran~

@mnapoli
Copy link
Author

mnapoli commented Oct 20, 2023

Oh! I swear the AWS documentation listed the AWS SDK JS v3 as "No", but maybe I was just blind 😅

Sorry about the noise, that is great news!

@tsibley
Copy link

tsibley commented Oct 23, 2023

@mnapoli Yeah, me too...

Copy link

github-actions bot commented Nov 7, 2023

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 github-actions bot locked as resolved and limited conversation to collaborators Nov 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request New feature or enhancement. May require GitHub community feedback.
Projects
None yet
Development

No branches or pull requests

3 participants