How to Fix Clock Skew Errors on EC2 Instances with Chrony?

August 1, 2025 2 answers
Asked by !29 audience members
I'm currently facing issues with 'DescribeEc2Snapshots' operations failing, likely due to clock skew problems. To address this, I've added chrony to the installation script that runs at boot for our EC2 instances. Here's what I included in the script: ```bash sudo apt-get install -y chrony echo "server 169.254.169.123 prefer iburst minpoll 4 maxpoll 4" | $sudo_cmd tee /etc/chrony.conf sudo systemctl stop ntpd 2>/dev/null || true sudo systemctl disable ntpd 2>/dev/null || true sudo systemctl enable chronyd sudo systemctl start chronyd ``` Despite these efforts, I'm still encountering clock skew errors. Has anyone experienced this and can offer insights on further troubleshooting options?

Answers

2ns_setup
It sounds like you're seeing some clock sync issues, but first, can you share more details about the actual errors you're getting? Setting up monitoring for your clock sync state could help identify the variance. Just remember, virtual machines often behave differently than physical hardware, so NTP isn't always perfect. Usually, AWS API calls shouldn't fail due to clock drift unless things are really out of whack.
Reply to this answer
not.a.typo.
Hmm, clock skew issues might indicate a problem with TLS rather than your operating system setup. Can you provide more context? What specific components are failing? Knowing the exact commands and APIs youโ€™re using, along with where they're being run from, can help pinpoint the issue.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions