aws-amplify / amplify-backend

Home to all tools related to Amplify's code-first DX (Gen 2) for building fullstack apps on AWS
Apache License 2.0
184 stars 62 forks source link

Deployment not showing new code for existing branches #1996

Closed chrowe closed 1 month ago

chrowe commented 2 months ago

Environment information

https://main.d2yfr6uk327l7n.amplifyapp.com/

Describe the bug

After I push code to the branch that already had code on it, I don't see the updates. If I create a new branch, it works fine.

Reproduction steps

Deploy code to a branch. Deploy some more code.

ykethan commented 2 months ago

Hey @chrowe, under the App setting -> Branch setting on selecting Reconnect repository and trigger a new commit does this start the build?

chrowe commented 2 months ago

I should have said that the build happens, but the site does not show the updates.

chrowe commented 2 months ago

Ok, this is working now. How long after a deployment is finished should I expect to see the updates on the site. I am testing in incognito mode, so it is not a browser cache issue.

Jay2113 commented 1 month ago

@chrowe Amplify Hosting supports instant cache invalidation after a deployment and thus you should be able to deploy updates to your application immediately without waiting for CloudFront CDN cache to expire or manually invalidating it. Here's a way you can verify whether the application has been updated per the latest deployed changes:

Screenshot 2024-09-20 at 10 48 08 AM

I am going to close this thread since the application is working as expected but feel free to reopen if you are still running into this issue. Thanks!