amplify-hosting
amplify-hosting copied to clipboard
Next.js app syncing with database on local but not when deployed.
I am using a Next.js app and on my localhost, I can create posts for which I have a model for in Amplify's backend read from aws. These changes are synced with the Amplify console. When I deploy it however, it returns an empty array of posts and creating a post will temporarily add the post to the site and can be viewed by different users but the post does not show up in the Amplify console and disappears after a minute or 2.
I am using Amplify backend with API, Auth and File Storage added. I used the Amplify CLI to pull my changes from AWS. I called Amplify.configure(awsExports); in my _app.tsx file.
I am not sure what my issue is necessarily, so any help is appreciated.