Hotfix 1: Redirect or Rewrite

This is the first edition of the Hotfix series, in which I document an issue I encountered in production and how I fixed it. We were in the midst of cleanup activities aimed at removing technical debt. Part of this effort focused on removing APIs that were no longer in use. It was silly of us not to properly define “no longer in use.” A proper definition should account for backward compatibility, especially when dealing with mobile apps rather than websites. Websites always fetch the latest version, so backward compatibility is not an issue, but there is no such guarantee with mobile apps because it depends on when users update the app. ...

September 27, 2026 · 3 min · 574 words · Mohit Sharma

Synchronising Clocks

Few days back, I encountered the following error on my website saral.club. botocore.exceptions.ClientError: An error occurred (SignatureDoesNotMatch) when calling the SendEmail operation: Signature not yet current: 20250505T152002Z is still later than 20250505T151830Z (20250505T151330Z + 5 min.) By the looks of it, the error message is descriptive enough to guide you that there is some kind of time mismatch in the signature. Before sending a request to aws, the botocore library signs the request using your access keys. The signature also includes a timestamp. And the error message is saying that the request I am sending is probably 5 minutes later (in future) then the current time (time on aws servers). Of course, the two clocks (one on my server and the other on aws’s server) cannot have the same exact time, so aws allows for some time skew (5 minutes). ...

May 6, 2025 · 3 min · 485 words · Mohit Sharma