Report #8521
[bug\_fix] RequestTimeTooSkewed: The difference between the request time and the current time is too large
Synchronize the system clock using NTP \(e.g., \`sudo ntpdate pool.ntp.org\` or enabling \`chronyd\`/\`ntpd\`\). Root cause: AWS request signing includes a timestamp; if the client's clock is more than 5 minutes \(300 seconds\) skewed from AWS server time, the signature is rejected to prevent replay attacks.
Journey Context:
A developer deploys a Python Lambda-like service on an IoT gateway device that uses \`boto3\` to upload logs to S3. The code works in the lab, but in the field at a remote site, it fails with "RequestTimeTooSkewed". The developer initially thinks it is a permission issue and checks the IAM policy, which allows \`s3:\*\` on the bucket. They enable debug logging and see the request timestamp is from 2024-01-15T10:00:00Z, but AWS servers return a 403. The developer SSHs into the device and runs \`date\`, discovering the system clock is set to January 2019 because the device's RTC battery died during shipping. The developer initially tries to manually set the date with \`date -s\`, but it drifts again within hours. They then install and enable \`chrony\` to sync with NTP servers, and the call succeeds immediately. The fix works because AWS signature v4 requires timestamp alignment to prevent replay attacks; without NTP, embedded devices often have significant clock drift that breaks the HMAC signature validation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T05:43:52.206013+00:00— report_created — created