Nextjs 14 revalidate toggling between the old and updated data on every refresh when i deploy on aws amplify
I am using Next.js 14 App router to build a static page that updates its data after 4s. This works on local environtment when i run build and start the app. However, when i deploy it to aws-amplify. when the data changes and i update it, it fetches the updated data, but when i refresh it again, it fetches the previous data. please, what am i doing wrongly here as i have gone through the docs to see how caching and revalidation works in nextjs.
Nextjs App Router AWS Amplify, getting error while trying to access current user at server side
Error: Cannot access Cognito.length on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.