-
Notifications
You must be signed in to change notification settings - Fork 646
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
Hello,
When trying to diagnose why some of our custom health checks did not failover our region immediately when DDB outage began we recognized it was because we were expecting ServiceException to be thrown by the SDK client with a $fault value on the exception.
We are checking the $fault to ensure this was a server fault before we determine that it is likely DDB is in a failure state... however it looks like the exceptions coming back when the DNS was down were likely just pushed back to our client as some sort of generic HTTP exception?
What I see in our logs is this:
{"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"Error: getaddrinfo ENOTFOUND dynamodb.us-east-1.amazonaws.com","reason":{"errorType":"Error","errorMessage":"getaddrinfo ENOTFOUND dynamodb.us-east-1.amazonaws.com","code":"ENOTFOUND","errno":-3007,"syscall":"getaddrinfo","hostname":"dynamodb.us-east-1.amazonaws.com","$metadata":{"attempts":3,"totalRetryDelay":259},"stack":["Error: getaddrinfo ENOTFOUND dynamodb.us-east-1.amazonaws.com"," at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:122:26)"," at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17)"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: Error: getaddrinfo ENOTFOUND dynamodb.us-east-1.amazonaws.com"," at process.<anonymous> (file:///var/runtime/index.mjs:1448:17)"," at process.emit (node:events:518:28)"," at emitUnhandledRejection (node:internal/process/promises:252:13)"," at throwUnhandledRejectionsMode (node:internal/process/promises:388:19)"," at processPromiseRejections (node:internal/process/promises:475:17)"," at process.processTicksAndRejections (node:internal/process/task_queues:106:32)"]}
I'm having difficulty determining whether this is the direct SDK output from one of our services or not... but I cannot local a single log that says $fault: 'server' as I would have expected during a DNS outage such as this?
Regression Issue
- Select this option if this issue appears to be a regression.
SDK version number
@aws-sdk/lib-dynamodb @ latest
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
18, 20, 22 all the same
Reproduction Steps
Not sure how to reproduce a dynamodb regional DNS failure
Observed Behavior
Did not see any ServiceException errors
Expected Behavior
Ideally would like these sort of things to be formatted as a ServiceException in some way so they can be caught and acted on.
Possible Solution
No response
Additional Information/Context
No response