Closed jbarnickol closed 5 months ago
Hey, @jbarnickol 👋. Thanks for opening this issue and it appears to be related to #9281 and #11675. We are investigating this and will follow up with any additional questions, but in the mean time can you take a look at those two other issues to see if they align to what you're experiencing?
Thank you so much for the thorough investigation and pinpointing the issue! A fix has been released and appears to be working on my side, can you please validate that this issue is fixed for you in the latest version of amplify (aws-amplify@6.0.25)?
@erinleigh90 Thanks for the quick turnaround! I confirmed 6.0.25 fixes the issue 🎉
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
REST API
Amplify Version
v6
Amplify Categories
api
Backend
Amplify CLI
Environment information
Describe the bug
I dug into this because our calls from browser to amplify API gateway are failing when clock is off by more than 5 minutes. It looks like an AWS sdk v2 => v3 breaking change was missed.
In the line of code core/src/clients/middleware/retry/defaultRetryDecider.ts#L19
should be
AWS.Response.code changing to AWS.Response.name was a breaking change in aws sdk v2 => v3.
I confirmed with logging that
errorCode
is undefined when passed toisClockSkewError(errorCode)
and this causes the request to NOT retry. Changing the errorCode value fixes the issue and I stop getting the error "Signature not yet current: 20240329T135554Z is still later than 20240329T134259Z (20240329T133759Z + 5 min"Expected behavior
Clock skew should be automatically handled starting in amplify v6 (access to DateUtils workaround was removed)
Reproduction steps
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response