I'm running 2 ec2 instances (ubuntu based) behind a load balancer. There seems to be a weird issue where the timestamps generated on these instances differ by 25 secs. This has lead to issues in our application where precise timing is involved.
I thought that the timestamps are supposed to be accurate and synchronized using NTP servers.
Is there any way I can ensure that servers have the timing in sync?
You can synchronize time between machines using NTP if you want, but it doesn't happen magically -- it will need to be setup by someone (either as part of your AMI, or during system operation). There's also the possibility that it isn't operating correctly, in which case you'll need to diagnose why that's happening and determine the course of action required to correct it.