Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
A clear and concise description of what the bug is.
When using s3.upload(); the error of (UnknownEndpoint: Inaccessible host:XXXXXXXXXX. This service may not be available in the XXXXXXXXXX region.) is logged.
Is the issue in the browser/Node.js?
/Node.js
Had issues with AWS SDK dropping a version number when invoked 2.684.0 => 2.683.0
Updated SDK to newest version 2.685.0 and when using s3.upload(); get the above error.
If on Node.js, are you running this on AWS Lambda?
No Lambda
Details of the browser/Node.js version
Paste output of npx envinfo --browsers or node -v
UnknownEndpoint: Inaccessible host: XXXXXXXXXX. This service may not be available in theXXXXXXXXXX' region.
at Request.ENOTFOUND_ERROR (/usr/src/app/node_modules/aws-sdk/lib/event_listeners.js:495:46)
at Request.callListeners (/usr/src/app/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/usr/src/app/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/usr/src/app/node_modules/aws-sdk/lib/request.js:683:14)
at ClientRequest.error (/usr/src/app/node_modules/aws-sdk/lib/event_listeners.js:333:22)
at ClientRequest.
at ClientRequest.emit (events.js:315:20)
at ClientRequest.EventEmitter.emit (domain.js:482:12)
at TLSSocket.socketErrorListener (_http_client.js:426:9)
at TLSSocket.emit (events.js:315:20) {
code: 'UnknownEndpoint',
region: 'XXXXXXXXXX',
hostname: 'XXXXXXXXXX',
retryable: true,
originalError: Error: getaddrinfo ENOTFOUND the-best-bucket-2020.s3.eu
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:26) {
errno: 'ENOTFOUND',
code: 'NetworkingError',
syscall: 'getaddrinfo',
hostname: 'XXXXXXXXXX',
region: 'XXXXXXXXXX',
retryable: true,
time: 2020-05-28T14:43:53.421Z
},
time: 2020-05-28T14:43:53.421Z
}
/usr/src/app/node_modules/aws-sdk/lib/request.js:31
throw err;
SDK version number
v2.685.0
For browsers, the SDK version number is in the script tag
src=".../aws-sdk-2.466.0.min.js"
For Node.js, get SDK version by
npm list aws-sdk from your root directoryconsole.log(AWS.VERSION) in your code where AWS = require("aws-sdk");To Reproduce (observed behavior)
Steps to reproduce the behavior (please share code or minimal repo)
s3.upload(params, (err, data) => {
if (err) {
console.log(err);
throw err;
}
console.log('Upload Complete', data);
});
} catch (error) {
throw error;
}
Expected behavior
A clear and concise description of what you expected to happen.
The required data is uploaded to the designated s3 bucket
Screenshots
If applicable, add screenshots to help explain your problem.
Due to the nature of the data and ownership of the code screens shots can not be provided.
Additional context
Add any other context about the problem here.
Issue only occurred when SDK was updated
This also occurs on a previously good working app when trying to push a new api using amplify.
FWIW, switching from expressvpn to google outline cleared up my problem. No explanation however.
On the surface, this would seem to be a DNS resolution error.
It's not possible to troubleshoot this without a reproducible test case.
@weisisheng, thank-you for reaching out to us with your issue, I was not able to reproduce the case, and I am not really sure how changing your VPN might effect that but I am certain that this wont be classified as a bug with the SDK.
I agree with @philipwigg.
I would like to close this issue now, please reach out if you have any further questions.
No Problem At All.
I appreciate your time.
I have overhauled the project in question and done a fresh install of the SDK (which stays at the current latest version no. ) and the problem seems to have been fixed.
Apologies for not providing adequate test case data (its due to code ownership issues)
Thank you for your time its much appreciated.
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.
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.
Most helpful comment
On the surface, this would seem to be a DNS resolution error.
It's not possible to troubleshoot this without a reproducible test case.