Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

itguy614's avatar

Missing (404) assets in cloudfront

After doing my deployment and working with my app I have developed a problem where vapor is telling me the asset is unchanged however I am getting a 404 when the asset is trying to load. Is there a way to force vapor to re-upload all asset to make sure they are available?

0 likes
4 replies
itguy614's avatar

I was able to get some support around this. In case you run into this issue, drop the Vapor support team a message that you need the assets cleared out so you can rebuild.

My suggestion to them was an additional command like,

vapor rebuild staging

This would rebuild everything related to the environment from the ground up.

Hope this helps someone.

1 like
GMcBroom's avatar

You can now start a fresh deployment from the CLI with the --fresh-assets option on the deploy command.

eg. vendor/bin/vapor deploy staging --fresh-assets

martinro's avatar

Every now and then I run into the same issue. If it's the staging environment I just delete, recreate and redeploy it. That's not ideal but the only way I get it back to work. Wonder why this happens on a somewhat regular basis.

Please or to participate in this conversation.