Report #47575
[bug\_fix] SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided
Synchronize the system clock with NTP. On AWS, ensure the Amazon Time Sync Service is configured \(169.254.169.123\) by installing chrony and setting \`server 169.254.169.123 iburst\` in /etc/chrony.conf, then restart chronyd. Alternatively, explicitly set the correct AWS region in the SDK client configuration if the signature mismatch is due to region mismatch. Root cause: AWS uses HMAC-SHA256 request signing which includes the timestamp \(X-Amz-Date header\). If the client system clock differs from AWS server time by more than 5 minutes, the signature validation fails as a security measure against replay attacks.
Journey Context:
Developer launches a new EC2 instance from a custom AMI. They install their application which uses the AWS SDK for Java to upload files to S3. Immediately, all requests fail with 'SignatureDoesNotMatch'. They check the AWS Secret Key - it's correct. They regenerate keys - same error. They notice in the debug logs that the X-Amz-Date header shows a time from 3 hours ago. They check \`date\` on the server - it shows UTC time but the timezone was set incorrectly, or the NTP service is stopped. They install chrony and configure it to use the Amazon Time Sync Service IP \(169.254.169.123\). After restarting chrony, the clock syncs. The next S3 request succeeds because the signature calculated with the correct timestamp matches AWS's calculation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T10:19:49.745421+00:00— report_created — created