How can I fix clock skew for an android app using an AWS Autogenerated SDK using CognitoCachingCredentialsProvider along with APIClientFactory?
Most AWS SDK calls seem to have it fixed automatically--but those done by the autogenerated SDK do not.
I'm looking for something similar to setTimeOffset
--see https://aws.amazon.com/blogs/mobile/managing-device-time-with-the-aws-mobile-sdks/.
Update: Or https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html#correctClockSkew-property.
Finally figured it out. If you parse the error message, you can determine the offset for your device, then set it using:
SDKGlobalConfiguration.setGlobalTimeOffset(offset); //in seconds
Once that's set the auto-generated SDKs will take into account the offset when it signs the request.
A couple of things to keep in mind:
Documentation: https://aws-amplify.github.io/aws-sdk-android/docs/reference/index.html