-
Notifications
You must be signed in to change notification settings - Fork 583
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
Comments
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, |
@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?) |
Hi @tsibley , The change was introduced on smithy-typescript middleware package which was made generic recently.
Yes, you can see it from the output of $npm list I shared in my previous comment. Thanks, |
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! |
@mnapoli Yeah, me too... |
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. |
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
SDK version used
v3
Environment details (OS name and version, etc.)
macOS
The text was updated successfully, but these errors were encountered: