Component doesn't load on app startup after deployment to multiple containers

Hi,

I have deployed a Streamlit application to ECS with multiple containers behind an automatic load balancer. We have a custom component called st_copy_to_clipboard that, upon deployment, will not load with the following error:

The network logs show that there is a 404 trying to retrieve the component’s index.html file. After the container has been up for a while, it then starts working again, but after a fresh build and release, the button fails to load.

There have been several posts about custom components not working or loading after deploying to cloud, such as this, this, or this.

We are on Streamlit 1.41.0. Any ideas would be greatly appreciated!