You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the issue #5192 and the workaround provided by @trivikr
If I take this case :
// ...constclient=newSSM();constsecret=client.getSecretValue(params);// Don't want to await there since it will extends my cold start timeconsthandler=async(event)=>{// Do some stuff// More stuff that can take some time// Now I need it so I can await itdoSomethingWithMySecret(awaitsecret);// Perfect timing, there's more chances that my Promise is already resolved}
Is this still possible with SDK v3 ?
Thanks :)
SDK version number
v3
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
20
Reproduction Steps
constclient=newSSM();constsecret=client.getSecretValue(params);// Don't want to await there since it will extends my cold start timeconsthandler=async(event)=>{// Do some stuff// More stuff that can take some time// Now I need it so I can await itdoSomethingWithMySecret(awaitsecret);// Perfect timing, there's more chances that my Promise is already resolved}
Observed Behavior
An SignatureDoesNotMatch Error is throwed sometimes (Auto Provisioning)
Expected Behavior
No error
Possible Solution
No response
Additional Information/Context
No response
The text was updated successfully, but these errors were encountered:
I'm not sure what your workflow looks like but if you're not using TLA (Top Level Await) in your application, you can consider moving API call inside the handler, although not recommended. If you could share your workflow and repro code, I'd be happy to further look into it.
aBurmeseDev
added
response-requested
Waiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.
p2
This is a standard priority issue
and removed
investigating
Issue is being investigated and/or work is in progress to resolve the issue.
labels
Jun 11, 2024
I don't think I can give more details with a repro than the code I show in the first message :
// ...constclient=newSSM();// Here we are outside the handler -> During the cold start// We start a promise -> Don't need to await it there since I won't need it now and don't want to extend cold start duration// This way, promise is fired up, if cold start take, for example, 200ms after this line, that's 200ms earned on the request durationconstsecret=client.getSecretValue(params);consthandler=async(event)=>{// Here i do some unrelated stuff that can take some time or no. Just unrelated stuffdoSomething();doSomethingElse():
// Here, I need my secret.// Promise was started during cold start. Maybe 10ms before. Maybe 100 or event 1000ms or 10 minutes ? Whatever// But since I await my promise here. I have way more chances that it has been resolved.// That some precious msdoSomethingWithMySecret(awaitsecret);// But if it's more than somes minutes after promise startup. The exception occurs}
Now the problem appear with SDK V3
If it was a simple request like axios.get('https://amazon.com'). No trouble
SDK V2 was ok with this.
Checkboxes for prior research
Describe the bug
Hello,
Following the issue #5192 and the workaround provided by @trivikr
If I take this case :
Is this still possible with SDK v3 ?
Thanks :)
SDK version number
v3
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
20
Reproduction Steps
Observed Behavior
An SignatureDoesNotMatch Error is throwed sometimes (Auto Provisioning)
Expected Behavior
No error
Possible Solution
No response
Additional Information/Context
No response
The text was updated successfully, but these errors were encountered: