Closed morwoen closed 4 months ago
Hi @morwoen ,
Thanks for letting us know. This seems like an oversight. @siddsriv is taking a look.
All the best, Ran~
thanks for reporting this, timeout config option been added for requests. closing this issue, feel free to create a new one if you encounter any other issues.
Thanks @siddsriv , could you confirm which version the fix is in?
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.
Checkboxes for prior research
Describe the bug
The MetadataService from @aws-sdk/ec2-metadata-service package ignores timeout config. The config is initialised in the constructor but is never retrieved from the object here or here.
SDK version number
@aws-sdk/ec2-metadata-service@3.565.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v18.18.2
Reproduction Steps
The above has to be run locally where there is no metadata service access.
Observed Behavior
Code hangs for over 30 seconds
Expected Behavior
After 2 seconds the code should return a rejected promise
Possible Solution
The config needs to be passed down to the HttpRequest.
Additional Information/Context
No response